0
votes

Can someone please tell me a way in PHP in which i can obtain the Facebook ID of current user that is logged in?

Im trying to output the users thumbnail using the following

img src="http://graph.facebook.com/---PHP ECHO FOR FB ID NEEDS TO GO HERE---/picture?type=square" align="left" /

Thanks

2
do you use facebook's php api? - technology

2 Answers

0
votes

What you are doing is correct,but you need to use the php sdk https://github.com/facebook/php-sdk/ to include in your website then withe the help of getUser() function you can get the current user id which when echoed in the image tag will give the user's image thumbnail