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

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?

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

Facebook app - Do i need those permissions?

I created an app for my clients. They uses this app from their website to post on their Facebook Page (and as the Facebook Page).
they use a Facebook Login button to connect to Facebook (with an account that can publish post on the page) from their website,
they complete a form
when the form is submitted, an article is created on the website AND a post is created on the FaceBook Page.
I ask for publish_action permission and manage_page permission when the user connects.
Those permissions need a review from Facebook, so I ask for it but the FB team says that I "only need those permissions when I use a public-facing Login". Is that not the case?
Currently, my app only work when I connect with the account that created the app.
You do need those permissions, but if the App is for your client only you donĀ“t need to get them reviewed. Just add your client as Admin, Developer or Tester of your App and the permissions will work for him without review.

how can i log in my website seamlessly using facebook credentials , when i'm already logged in my facebook account?

how can i login my website using facebook credentials that too seamlessly , when i'm already logged in my facebook account in the same session or in another session. For example i'm logged in my fb and when i open website named rottentomatoes.com in the same session or in another session , i can get automatically logged in , without doing anything , as that site use my fb account and automatically get a registered memeber of that site.
i wanna do this things in my website , like things happening with rotten tomatoes.
so far i can use fb account to login in my website using facebook connect .
please help me ....any suggestion will be welcomed.
You need to have a facebook app, then in your site use the facebook js sdk.
You always have different sessions per site, you'll need to make a session for yours, you don't use the facebook session, just the sdk.
When the user loads your page you can use the FB.getLoginStatus to check if the user is logged into facebook and is authenticated with your app, if so then you get the needed user data and can then log the user into your site.
If the user is not logged into facebook, or hasn't authorized your app then you can use the FB.login method to log the user in, when the user comes back from that process you should have the data you need in order to register/log him into your site.

Login with Facebook integration without registering the website with 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

How do users log in to websites like facebook from some site that supports "share on facebook" features

I'm browsing some news sites and most of them have the option of posting the link on your facebook wall. Or retweeting it. Or to other social media sites.
How do they get the user to authenticate themselves? I just push a button and it asks me to log in, and then it creates a new post on my facebook wall.
I want to reproduce this behavior but don't know where to start.
Read the facebook information for developers here It allows you to create actions that users can do on your site like reading an article or post a photo and it will add it to their facebook profile. There is also the capability for users to register or login to your site using their facebook credentials.
Similarly go here for twitter.
These sites are all using OAuth. It basically involves the transaction of a request for an access token from the site you are logging in through. Your users validate that they approve the validity of your request by authenticating with the third party system such as Twitter or Facebook and then these systems return a token that allows you to read/write/modify user data from these sites on their behalf.