Question

I've inherited a PHP application which is using the Facebook PHP API to register and log users into the site. I see in the code there is a Facebook ID (which is the user ID for of the Facebook account (verified by using facebook.com/profile.php) and a FB secret string.

My experience with Facebook application development was that I needed an application ID and a secret (not a user ID) to connect to the API. However, I do not see a FB app ID anywhere in the code, and I don't know how to locate the FB secret when I'm logged in as this user on FB itself. So I guess I have two questions:

  1. Where do I find the FB secret for a FB user? (if this even makes sense)
  2. Does the FB api not require a FB app ID? (and can use a user ID)
Was it helpful?

Solution

Follow these steps

> Click on Setting Gear icon of facebook
> Click Manage Apps
> there You'll get your App ID and a link saying "show" below App Secret
> Click that "Show" Link and get your App secret

Also facebook gives you an App ID for each app which is public ID and an App Secret which is to authenticate that you and only you can manage your apps, you'll need your App Secret each time you make an API call to facebook.

As for as a user is concerned each user has got his/her facebook ID and for each user, your app is given an access token to get access to user information or act on behalf of a user depending on permissions asked by user App from user, Given the User has accepted those permissions and the access token is valid.

Further the validity of Access token depends upon expiry period plus access token can also expire if user changes his/her facebook password

OTHER TIPS

  1. Their is No secret id for a User Only for the Application That can be Find In the facebook developer Dashboard.
  2. FB app must need a Facebook app Id
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top