Mika Cohen
Mika Cohen

Reputation: 11

What is the way to detect if user installed my facebook application for the first time?

Im looking for a way to check after user autorized to my facebook application, if he is a new user - just installed the app, or he was in the past and he did sign in... any ideas?

Upvotes: 1

Views: 947

Answers (2)

Nitzan Volman
Nitzan Volman

Reputation: 1829

partial solution, you can use FB javascript api FB.getLoginStatus this will return connected, not_authorized or unknown statuses

If the user is not currently connected to FB login status will be unknown which makes this solution not complete.

If the user IS currently logged into Facebook, then connected means he authorized your application and not_authorized means he didn't.

couldn't really understand the documentation of the PHP FB api of equivilant method, might be possible to do the same thing in php without javascript.

Upvotes: 0

bkaid
bkaid

Reputation: 52093

The most reliable way would be to add a table or log file to your application to record such events and check if this facebook user id exists in it already. Facebook used to have a post authorize callback url it would ping when the user first authorizes (or removed) your application but they have seemingly removed this functionality.

Upvotes: 2

Related Questions