Login with Facebook integration without registering the website with facebook - facebook

I want to use "LOGIN with Facebook" function for the new website. I have created a page with a Facebook login.
When I am trying to get code from:
https://developers.facebook.com/docs/reference/plugins/login/
It is asking me to create an Application.
So my question is Can I use "Login with facebook" functionality without Facebook Application integration?

No, you can't. Even when you retrieve the code you need for the Login plugin, Facebook instructs you to substitute APP_ID for your own. You'll need an application if you want to retrieve data about that person when they login, for example
email
name
gender
location
etc...
You'll have to authenticate your users with an app_id and app_secret to retrieve an access_token. That access_token is unique per user per application. More info on authentication is here.
Basically, every time you want to query Facebook's databases, with the Graph API or FQL, you do so on behalf of the user. Facebook links these calls to applications so that they will be able to know which application has what permissions and also what they are doing with them.
Click on over to https://developers.facebook.com/apps and after you have verified your Facebook developer account you'll be able to create a new app

Related

Link facebook messenger with facebook login on app

I have a facebook messenger bot that sends a webhook to my web app. People can login to my app via facebook login.
The first user contact is normally with my facebook bot on which they can create a profile. When they make contact I take their facebook id, name, profile pic, etc.
Users can then login with facebook to my web app to enhance their profile.
My problem is facebook uses different scoped ids for messenger and their login.
How can I recognise if a user has already been on my facebook bot if they use my web app, and vice verca.
I think it has something to do with the business mapping api: https://developers.facebook.com/docs/apps/for-business but I'm struggling to understand how it works.
I am sending a get request using:
GET /me?fields=token_for_business
But the docs do not specify the full url to use. I'm also unsure if you can use this in developer mode.
facebook provides an id-matching api
for the app and pages owned by the same business manager. More informations:
https://developers.facebook.com/docs/messenger-platform/identity/id-matching

Linking a website account to a facebook account so the user can post from the website anytime

I'm using the javascript API to link a website account to a users facebook account but I'm not sure if I'm doing it the best/easiest way.
I've created a facebook app
Used the FB.ui feed option to allow the user to post to their timeline
This works fine but the ui will ask the user to login each time they start a new session on the website. Have I missed something? Do I need to store and use the User Access Token?

Do review required if we want to get Facebook Page like count (Without Facebook login) by Facebook app token?

I am doing a static web page in my website, in which I am showing the like count of particular Facebook page. There is no kind of login required to see this web page. Also, I don't want to user to login with their Facebook account to see the Facebook page like count.
I have implemented this requirement by using Facebook app token.
API: "https://graph.facebook.com/PAGE_ID?access_token=APP_TOKEN"
But the problem here is, If I use the app token of already approved app by Facebook with some permissions (manage_pages) exists, it works. It is not working for the app token of newly created Facebook app.
I have sent the app for review to Facebook by requesting manage_pages permission, but they rejected the app and said that my website doesn't have the Facebook login functionality implemented.
Since it is not documented clearly, I have a doubt that do the app need to send for review if I want to get the Facebook page like count without Facebook login (By using Facebook app token)? If yes, what permission do I want to request?
Any help would be much appreciated.
First of all, you need to learn what Tokens there are:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
For your problem, you can just use an App Access Token. There is no need for any permission or Login Review, the links above tell you exactly how to create one. Make sure you never use the Token on the client, especially because it includes the App Secret. Do the API call on the server only (file_get_contents or curl, if you use PHP).
If by "it does not work" you mean that you only get the id and the name, then it´s not about "not working", you need to read the changelog and search for "Declarative Fields": https://developers.facebook.com/docs/apps/changelog#v2_4
So if you want to get more than just id and name, the API call would be like this: https://graph.facebook.com/936299239766048?access_token=YOURAPPTOKEN&fields=id,name,likes,...

How to get the logged in user's facebook ID?

I am using facebook connect to allow users to log-in to my site using facebook. I am using the server side authentication using OAuth in classic ASP, vbscript. I want to know if one of the following is possible:
1) Can I identify if the user has authorized my app without redirecting to the Auth dialog? ie, even before the user clicks the facebook login button to log-in to my site, is there a way I can find out if the user who is currently logged into facebook has authorized my app?
2) How can I get the facebook user Id of the user who is currently logged into facebook? This is outside the facebook authentication process. Does facebook offer some api which I can use to read the fb cookie that is set when a user logs into facebook and get the logged-in users's facebook user id?
Thanks
1) Use FB.getLoginStatus from the JavaScript SDK.
2) If he’s not connected to your app yet, then not at all. Otherwise, see 1)

Get Facebook User Id of my website visitors w/o auth

Is there any way to get the Facebook User Id of visitors in my website by using the FB API, but without need to ask them to authenticate my Facebook app?
All I need is some facebook-related-identifier, it does not even have to be the User Id, but any kind of identifier that can relate the user to a facebook profile.
Ideas?
If the user does not explicitly authorize you to get some private data from his Facebook account (included his Facebook ID), you can not get them.
I cannot think of a way to get the Facebook ID without the authorization of the user.
Hope that helps.