Issue
I am trying to get the name of the person who has posted the post, but I don't understand how to get the name from the array.
Here is the full code: http://pastebin.com/88ADm5Uw
This is the line I have a problem with:
echo "FROM: " . print_r($post['from']) . '<br>';
This line returns two values(id and name) and I want to only print out the name. Please help!:
EDIT: Any way to get the profile picture?
Solution
Try this:
echo "FROM: " . print_r($post['from']['name']) . '<br>';
You can see the complete JSON here:
https://developers.facebook.com/tools/explorer?method=GET&path=me%2Fhome
Answered By - Sahil Mittal
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.