tags:

views:

196

answers:

1

Hello, I need to generate a picture from facebook user profile picture and post it to some users' walls. For instance, $attch = array( 'media' => array((array('type' => 'image', 'src' => 'https://graph.facebook.com/'.$uid.'/picture',
'href' => 'https://graph.facebook.com/'.$uid.'/picture/')));

'src' => 'https://graph.facebook.com/'.$uid.'/picture' line doesn't show any picture...

How can I resolve this?

Thanks

A: 

It's not showing a picture because there's nothing at https://graph.facebook.com/[user id]/picture. You need to query https://graph.facebook.com/[user id] and parse the JSON to get its URL.

Johannes Gorset
so I need something like this... $ pic = json_decode(https://graph.facebook.com/[user id]/picture)
@user341879: No. As I said, there's nothing at /picture/.
Johannes Gorset