How-to articles, tricks, and solutions about FACEBOOK-GRAPH-API

Facebook Graph API, how to get users email?

To get the email of a user through the Facebook Graph API, you will need to follow some steps.

Facebook SDK returned an error: The "state" param from the URL and session do not match

This error message appears when the SDK is being used to make an OAuth request to Facebook, and the "state" parameter in the URL doesn't match the "state" value that was stored in the user's session.

How can I display the users profile pic using the facebook graph api?

To display a user's profile picture using the Facebook Graph API in PHP, you can make a GET request to the /{user-id}/picture endpoint.

Redirecting to authentication dialog - "An error occurred. Please try again later"

This message typically indicates that there is an issue with the authentication process.

Simple example to post to a Facebook fan page via PHP?

Here is an example of how you can post to a Facebook fan page using the Facebook PHP SDK: