how do I use new App ID & secret ID without affect the existing access token - facebook

First, I have use Facebook App ID & Secret ID, then Login with Facebook and get Access token,
I have changed the my Facebook App ID & Secret ID, but, affect the existing user Access token.
How do I get new Application Access token without Login with Facebook?

Changing your App ID effectively means you've created a new application. Since the access_token is tried to a particular App ID and Secret combination, you cannot transfer existing users over to the new App ID. Furthermore, Facebook Platform Policies does not allow sharing of user information between different application - you'll just have to get users to login into the new application.

Related

Can we get facebook app id and app secret with access token?

Am trying to get the fb reports, better way is to use facebook internal functionality to get reports. But for that i need app id and app secret, i have access token with that token is it possible to fetch app id and app secret?

Get Facebook Users Access Token

Is it possible to get the access Token of a user with his FacebookId, Application Id and Application secret ?
PS : The user has already accepted to use the app.
Thanks
You can get the access_token of the user at the time he adds the app, or when he login again using the app. Not at a later moment than that.
You can use an app access_token which doesnt expire and is valid from the point the user adds your app. But keep in mind, it has limited retrieval capabilities comparing a user access_token.

Dynamically generate access_token to fetch page or group post

I am creating a magazine in my site thatI needed to get the post of users from their groups and page. The API for it requires the access token to get the required data.
I need to generate the access token for the user which required APP key and secret.
But what if the user has not created any APP and they just want to get the post from their page or group, as most of the normal users do not create any APP.
So is their any way I can fetch their group or page post easily or can get the access token for the user.
You need to create the app for your site. This way, you have the required key and secret to generate an access token, and you can fetch content for your users. No need for your users to create an app :-)

Authenticated Referrals - how to tell if a user just authenticated

I have a game where I want to track user logins/installs. I need to be able to detect when a user was just redirected to my app from the authenticated referral dialog. Since we cannot specify our own redirect_uri after the user authenticates, nor does Facebook append any sort of flag for canvas apps - is there any way to achieve this?
3 Auth Token Parameter: If Authenticated Referrals is enabled and when a
user authorizes your app through the in-line Auth Dialog, we will pass
your app the Auth Token in the format specified here. Available
formats: URI Fragment: if your app is using client-side
authentication, Query String: if your app is using server-side
authentication. If your app is a canvas app, we will not use this
setting and will use the "signed_request" as the response type
automatically.
Based on that information from http://developers.facebook.com/docs/opengraph/authentication/, I would suggest you read the signed_request and see if the auth token is there. If the token is there and that id is already in your data store, you dont log is as a new app install. If the token is there and that id is not already in your data store, then you can add the user to your list of app users in your data store and track it as a new install.

how can I find the owner of a facebook app ID?

A while back I created an app ID on facebook and added the appropriate meta data to a website. I now want to continue adding facebook-related features to the site, but it seems the app is not related to my account afterall.
I must have created it under a different account or something, but how can I find who the owner is based on an App ID? I have existing likes, so I don't really want to change the App ID. I don't see any way in the UI, and I do not see the app when I go to the Developer app. Is there a way to do it using the Graph API?
If you have access to the app id and the app secret but no access to the app within Facebook it is possible to discover the creator_uid and from there the email address of the app owner using the graph api.
First get an app access token:
https://graph.facebook.com/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&grant_type=client_credentials
With this you can get the creator_uid:
https://graph.facebook.com/{APP_ID}?access_token={APP_ACCESS_TOKEN}&fields=creator_uid
Using the app token you will then get the email address when looking up the creator_uid in the graph api:
https://graph.facebook.com/{creator_uid}?access_token={APP_ACCESS_TOKEN}
EDIT (Jan 2013)
Looks like Facebook have removed app profile pages so that method no longer works.
Option 1
You could return the app object, which stores all the populated information about the app by requesting:
https://graph.facebook.com/xxxxxxxxxxxxxxx
Option 2 (This method no longer works)
Or, you could visit the app's profile page and contact the developer directly using the 'contact developer' link:
http://www.facebook.com/apps/application.php?id=xxxxxxxxxxxxxx
(you'll need to replace xxxxxxxxxxx with your app id)
I got this working. If you have both app id and app secret then you can try below steps to get the owner details.
Get the access token using id and secret of the facebook app.
https://graph.facebook.com/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&grant_type=client_credentials
Using the access token you can call the below API to get a list of administrators of the app.
https://graph.facebook.com/{APP_ID}?fields=id,name,roles&access_token={ACCESS_TOKEN}
Retrieve the owner profile details by,
https://www.facebook.com/{USER_ID}
I have a similar problem, in that I have the id and the secret but no access to the app within facebook.
I haven't found a way to see who owns does have access to the app. But I have found a way to contact a dev
First get the app access token.
https://graph.facebook.com/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&grant_type=client_credentials
Then get the address:
https://graph.facebook.com/{APP_ID}?access_token={APP_ACCESS_TOKEN}