how to show facebook and twitter user profile image on my website's comments

Digital Marketing Facebook Marketing API 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ I am showing Gravatar's Avatar on my webpage comments like that $hash = md5(trim($row['email'])); $default_usr = urlencode('http://localhost/example/images/user-icon.jpg'); src=\"http://www.gravatar.com/avatar/$hash.'.jpg?s=45&d=$default_usr'\" but i want that as avatar's when someone post a comment on my website using an email which belong to its facebook account or twitter account his/her 's image shows on my website's comments too. But i don't know how? Any Facebook Lover or twitter lover who can help me Please Please. I do not want to use facebook app i am developing my own comment widget using php where i want to use it

Posted on 16 Aug 2022, this text provides information on Facebook Marketing API related to Digital Marketing. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ http://graph.facebook.com/paul.knox.anthony/picture will get you the profile picture of a user from the Facebook graph API. file_get_contents() with PHP should allow you to grab that. However, it looks like you only have the email address of the user. In that case, you'll need authorisation from Facebook to get the user from just an email address. See: Is there a way to get an user's email ID after verifying his/her Twitter identity using OAuth? Facebook API - How do I get a Facebook user's profile image through the Facebook API (without requiring the user to "Allow" the application) You are most likely going to have to do some OAuth stuff.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.