Facebook API: Login only for API ID owner - javascript

I try to build a web application that, through it, I can publish post on Facebook.
Problems come out when i wanna log the user without showing login popup, but only insert text and send message, without that nuisance.
But the login popup it's useful for provide use of my app to all user Facebook.
This app it's exclusive for one person, so i don't need that all user Facebook use my app. So I thought a login in function only for API ID/KEY owner
It's possible?

Related

Silent login with facebook api

I have an app that allows a user to login with facebook. Is there anyway to keep a device authorized. For example, every time a user needs to login with facebook they are routed to the facebook application, where they are then routed back to my app. Is there a way to check for an access token and not re-route the user. I am using expo-facebook package and react-native.
For the first time when user wants to login with facebook then Routing to the facebook API is necessary its official in the FB API docs ! But on second attempt it will not redirects you to the facebook to get data ,it implies fetches the token and you can move on !

facebook js sdk. How do I login with facebook, without the user actually login into facebook?

I am new to stackoverflow, so I hope that I ask the question correctly.
For a website that I am working on, I have to implement login in using your facebook account. I have this working for the biggest part, since the user is able to login with using facebook and I'm able to retrieve the information I want.
But the problem is, whenever the user logs in with their facebook account, he automatically gets logged in into facebook itself. And whenever the user presses the log out button, facebook logs him out too. For the facebook login, I am using the javascript sdk from facebook.
This can be quit anoying for the user, since it must be possible for a random user to login my website using their facebook account, even when someone else is logged into facebook itself on the same computer.
So my question is: is it possible to login with facebook, without the user actually login into facebook, like just let facebook verify the account and send the requested information back? Using the facebook js sdk off course.
That is not possible. You cannot have 2 different Facebook sessions in one browser and you need to login to Facebook in order to login to your App.

How to logout user from the Facebook when he does not authorize the application

I have ASP.NET web application that
Runs on public computers
Allows users to register by using their Facebook accounts.
Must always logout a user from the Facebook after registration has been completed.
Registration process contains the following steps:
Registration page is shown with the Facebook icon.
When user clicks on the Facebook icon, he is redirected to the Facebook web site.
On the Facebook site user enters his email and password and clicks login.
On the Facebook site user clicks Allow to authorize my application.
User is redirected to my application.
The application registers used in the database.
The application calls FB.logout in order to logout from the Facebook. So when new user starts registration he cannot use account of previous user.
The application works perfect until user clicks Cancel at step 4.
When this happens, the browser is redirected to my application, the user remains signed into the Facebook but the application is not authorized by this user. This means that the application cannot logout this user from the Facebook by using the FB.logout method because the application does not have access token.
How to logout from the Facebook in this case?
Thank you.
How to logout from the Facebook in this case?
Not possible at all.
If logging a user out without a valid access token was possible, then every website I’m visiting could do that if they liked – I’m sure you can see how annoying that’d be to users, and that it’s therefor not possible.

Not completely logout using "www.gigya.com"

I am trying to integrate Gigya(www.gigya.com) javascript api for social network login . I am successfully login with facebook. Also when I click on logout button it seems that i get logout from facebook. But when I again click on facebook login button then it not asking for login id and password, directly get login from my account.
The code is use is as follows:
gigya.services.socialize.logout(conf, {});
I have searched on gigya's forum and i found that it only logout from gigya's platform but not from the facebook.
Can any one know, how to get out from this problem? Please help..
they have maintain their cookies and session that's why you can not logout from all for example stackoverflow if you used openId then you know that. when you login using openid for e.g. google account id then open gmail you directly view your inbox and if you logout from the gmail/stackoverflow then only one of them will logout because they have maintain individual cookies and session for login time they for openid they create cookies related to that service provider like google or anyelse
for this to happen we need to set the flag forceProvidersLogout to true in the params that we sent to gigya.
Refer to the api link # http://developers.gigya.com/020_Client_API/020_Methods/socialize.logout

How can I hook up facebook connect with our site's login?

I want to implement something similar to what Digg has done.
When the user logs in for the first time, I want it to force them to create an account on my site.
More importantly I want to know how to log a user into my site when they login with facebook connect. If they login with facebook connect, they still haven't provided me the password to their account on my site, so I can't use username/password to log them into my site. How do they do this on Digg or sites similar to this?
Facebook's process flow can definitely be a bit confusing. Take a step back from the details and the API, and look at the overall flow here:
Facebook Connect will tell you that a user is logged into Facebook, and give you their Facebook ID. You can validate that ID against Facebook using Facebook Connect to make sure it is properly logged in. Once this is done, you don't need a user name and password. As long as you trust that Facebook has authenticated the person properly, they are the only ones that can come to your site using that Facebook ID. That is enough information to start an authenticated session based around a local account that is associated with that ID.
The process you should follow is like this:
User logs in to your site with
Facebook Connect for the first time
You notice that you don't have a local account associated with that
Facebook ID, and prompt them to
enter local account information
You save that information along with their Facebook ID
The next time you see that Facebook ID (and validate that it is
logged into Facebook using the
Facebook API), you can start up a
local session using the associated
account.
Basically you end up with two separate methods of authentication: a Facebook Connect ID check, or the regular username/password login on your site. Either one should have the end result of starting a local authenticated session.
Hope that helps.

Categories

Resources