Facebook Mobile App identify installed user - facebook

I have a Facebook App where it can be installed on a users page and then their clients can make bookings with them. As such, the app needs to know who installed the app on their Page, not so much who is currently using it.
I can do this on the web app using signed_request and Page Id. Signed request is not available on Mobile Facebook apps though. Is there any other way of identifying the installed user?

No, in order to get the user's information you'll need them to Login to the app and give you permission to see their data; the workaround you're using elsewhere with the signed_request doesn't apply, because that's specific to page tab apps, and only gives you the 'like' status, not the user ID

Related

Facebook web app: How to store an ID for user recognition

My company is developing a web app, we are looking to integrate this to Facebook, basically our web app provide some reports. Now some of the clients want to show some information in Facebook. Even though, we dont have any experience developing for Facebook we opened a developer account and we selected build a web-app(We are thinking to embed our web-app in Facebook).
So our question is:
how we could store an ID of our client once he install the app in Facebook?
does Facebook store this ID and every time a visitor in our client's Facebook app enters to the app in Facebook, Facebook sends this ID to our website to recognize which client is it?
Thanks for any inside on it.
Your question is very broad. I would advise to start reading the documentation on Facebook Login to get an idea about how it works.
In general, when an user logs in using Facebook, you will receive an App Scoped User ID. That is an ID that is unique and identifies the user for your app (note: for the same user, each app gets a different ASUID). You can use this ID to keep track of all your users.

How to find a Facebook user page by an app user id

I can get my second user id by using my mobile app via Facebook SDK.
If I told my second user id to an other Facebook user who uses same mobile app,
can he/she find my Facebook page by using it?
I found out the way to access to my Facebook page.
That is to launch a browser app and fill in the following URL.
http://facebook.com/{ID}
But, I could not find out other way.
I want to find the better way.

Do i need the Facebook PHP SDK for Page Tab Apps?

I'm developing a Facebook Page Tab App. The files are located on my own server and i've created a Facebook App.
Now i'm trying to access the user's first name and i found different ways to get user informations, e.g. the $signedrequest (for the user ID) or the Facebook PHP SDK.
So do i need the SDK, e.g. for Graph API calls, or are there other ways to get informations from Facebook in my Page Tab App?
Using the SDK i get a lot of errors like An active access token must be used to query information about the current user., even if the user is already logged in.
If the user have not signed in to your app you will not get the user name or user id from the singend request parameter. It will give you information if the user likes the page, is admin of the page and additional app_data.
Using the php-sdk you can use the getLoginUrl() method, https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/, to get the access token needed to fetch user name, user id etc.

Login the user with Facebook without revealing the APP ID

In the Facebook documentation about Login the user with Facebook APP they say:
"Because it requires you to include your App Secret you should not attempt to make this call client-side as that would expose this secret to all your app users. It is important that your App Secret is never shared with anyone".
I understend it is about APP Secret, but what about the Developer ID?
The developer ID is added in the URL address of the window for login the user with Facebook:
https://www.facebook.com/dialog/oauth?client_id=APP_ID&redirect_uri=...&state=...&scope=...
The APP_ID can be copied and used by anyone.
I tryed with JavaScript SDK, and with PHP SDK, but in both cases the developer ID appears in the address bar.
I tryed also the get and display the page from that URL address using cURL, but of course not works.
Is there any way to login the users in my web site using Facebook, without revealing the developer ID?
Or, it doesn't matter if someone uses your Facebook APP ID?
you could try using iframes? not a very good solution for the problem because it's still very much available but at least it's not in the address bar.
It doesn't matter, this is essentially public information.

How to determine if an app is authorized to a fan page

Forgive me if this has been asked before, but I was unable to find an answer to what seems a simple question. I have an app that is authorized to a user & user's fan page via a process from a website I've constructed. The process is this:
Visit Website --> authorize website to view list of fan pages --> Select Fan Page to install app to --> Authorize app to user account --> Authorize app to Fan Page
I've got all that working (a process, let me tell you), and everything functions as intended. I'm working on an admin interface to manage the app which is not housed in the Canvas App location but on the website itself. I haven't found a way to figure out if the app is installed or not. It appears that the Graph API / FQL doesn't support this.
My two issues are:
I have the user id & the fan page id but I can't figure out whether said fan page has my app authorized or not. Depending on this answer will determine whether I show the "Install This App" panel or the Administration panel.
I've read that the best method is to store the userid when the app is initially authorized, but after the app is authorized, the user is sent to the Fan Page's Wall and I can't figure out how to notify my iframe app.
[edit] I misunderstood your question and thought you had less implemented than you seem to have: If you have manage_pages permission for a user, you can get the Page access token for each of their pages, and access a list of apps currently installed as tabs on that page - the instructions are at https://developers.facebook.com/docs/reference/api/page/#tabs
[/edit]
Each request made to your app's 'page tab url' will include a signed_request parameter.
The method to decode it is explained at https://developers.facebook.com/docs/authentication/signed_request/ - when your app is loaded on a page tab you'll get the 'page' parameter.
So:
The first time the tab provided by your app is loaded on a new page, you can detect the page ID from the signed request.
This callback will also tell you if the user currently looking at the page tab is an admin of that page (which can be useful for your own edit interface, if applicable)
If you haven't already got an interface where the app user tells you which pages they admin you can get a list of all the pages that user administers by accessing the 'accounts' property on their user object (/me/accounts in the Graph API) once you have the manage_pages permission
can you keep track of who has the app authorized in a database on your website?
i.e. call a script on your website server from your app that returns whether or not the user has authorized the app.