开发者

Facebook: How to get back the short PID from an FBID for a photo?

开发者 https://www.devze.com 2023-01-31 04:57 出处:网络
I am using this code to post a photo to my applications photo album.My question is how can i convert the FBID that this code returns into a shore PID for the photo?

I am using this code to post a photo to my applications photo album. My question is how can i convert the FBID that this code returns into a shore PID for the photo?

$file= 'test.jpg';
$args = array('message' => 'Photo Captio开发者_JAVA技巧n');
$args['image'] = '@' . realpath($file);
$data = $facebook->api('/me/photos', 'post', $args);
print_r($data);

This returns an array with ID being the FBID of the photo uploaded. I need the PID of the photo.

Thanks


I figured it out. For anyone who wants to know i did FQL like this:

SELECT pid FROM photo WHERE object_id = "FBID"
0

精彩评论

暂无评论...
验证码 换一张
取 消