php - After upload photo, how can i retrieve the photo on my apps? -


I am using the following methods to upload a photo:

  $ args = Array ('message' = & gt; 'photo caption'); $ Argens ['image'] = '@' realpath ($ file); $ Data = $ facebook-> API ('me / photo', 'post', $ args); Print_r ($ data);  

After the success of uploading photos, $ data returns "array ([ID] => 1.16874205038E + 14)" How can I use photos on my app?

  resonant sprintf ('% s', $ data ['id']);  

You can ask php to treat as long as the string, and after that you can work with the string as you want.

  $ photo = $ Facebook- & gt; API (sprintf ('% s', $ data ['id']));  

This will return an array of your photo descriptions.

PS: I'm not sure if you need an inherent molding for the string in this particular case, you should get $ photo without sprintf or without You can try .


Comments