Question:

How to act on behalf of the user when he/she is not using my appl?

 

 

 

Answer:

Appreciate if you can like this page if you find it useful! - Click "Like"

First of all, based on what you want to do, your application needs to request the corresponding extended permissions. In addition to that, your application should also request the "offline_access" extended permission.

Below is the description of "offline_access" in Facebook's document,

Enables your application to perform authorized requests on behalf of the user at any time. By default, most access tokens expire after a short time period to ensure applications only make requests on behalf of the user when the are actively using the application. This permission makes the access token returned by our OAuth endpoint long-lived.
http://developers.facebook.com/docs/authentication/permissions

So, at the time when the user has granted the permission to your application, you can stored the access token.

At the time when your application wants to act on behalf of the user, simply include the long-lived access token when calling the Graph API.

 

 

Find my FAQ on Facebook Development useful? Download the PDF for all the FAQs HERE!