I want to download event information from a company's Facebook page using FacebookSDK 3.1.1 to present in a UITableView. This works fine as long as the user is logged in to his/her Facebook account.
It also works fine if I manually request an access token from developer Facebook and send it along with the Facebook URL request.
Can I request an access token from within the iPhone without being logged in?
I find the facebook developers page a bit difficult to navigate.. Anyway, here is the answer: http://developers.facebook.com/docs/concepts/login/access-tokens-and-types/
Related
I'm making an app that is running on iOS 6.1.3 and Facebook SDK 3.5. When the app launches, the user is asked to authenticate with Facebook. I ask for read permissions here and have an access token after a successful connection.
However, one of my features involves showing a UIWebView popup inside of my app that is on the Facebook mobile website. Ideally, I'd like to be able to have the user load this UIWebView and be logged into Facebook automatically on the mobile web version without having to reenter their credentials. Is this possible? If so, how could I go about doing this?
I guess a simpler way of describing what I'm trying to do is:
1) User logs into MyApp and grants me permissions with an access token.
2) User opens Safari. Right now, going to m.facebook.com will prompt user to login once more.
Q) How can I get it to where the user is automatically logged in on m.facebook.com using the access token that I have?
Thanks!
I log into my Twitter account. Then I visit this twitter app website. I click sign-in with Twitter link, I am redirected to Twitter authorization page, I give auth. Then I see member page of app website. Then I check authed Applications from my Twitter account: https://twitter.com/settings/applications
I see that I authed that application. Then I remove all cookies of app website. But I don't logout from Twitter website. I revisit app website and click Sign-in with twitter.
Without Auth confirmation I am redirected to members page. How can it be?
I understand that they save my auth tokens inside their database and use to verify credentials. But without cookie etc. how can they know that I'm that Twitter user?
Is it possible to know that user logged in to Twitter?
This problem can be solved when "authenticating" is used rather then "authorization".
Authorization needs permission everytime user sign-ins, authentication needs permisson if user didn't give permission previously or he/she revoked the permission.
That is called as transparent login.
Note: Authentication doesn't include DM access.
https://dev.twitter.com/docs/auth/implementing-sign-twitter
I'm here to discover if what I want to do is possible or not. Can I connect to facebook using a rails method without passing through the facebook confirmation page?
I want to implement an app that should have a facebook acc/pass and I need to send a comment in a timeline, but I don't want to allow the facebook page. I want to do something automatic.
Thanks!
No, the facebook api in rails is built in a way that you can't directly login to your site using facebook. This is restricted for facebook authorization issues and it's terms and conditions.
If the user wants to allow access, he’ll have to log into his account (still on the facebook page) before being redirect back to your application. In the background Facebook will return an access token that your application will use to get access to the users data.
Check this for more details.
I'm learning to use the twitter API for the first time. I want to build a website that allows users to post messages to their twitter, facebook and linkedin account. They will need to sign up first via the website's registration/authentication system, which is in not related to twitter, facebook and linkedin. Once logged in, they should be able to synchronize their twitter, facebook and linked in account with my website.
I'm starting development with twitter first. I followed this tutorial here:
http://www.1stwebdesigner.com/tutorials/twitter-app-oauth-php/
After authenticating, twitter sends me to this url.
http://mywebsite.com/?oauth_token=o7gIh4x8xAs1mcms6OKthLoLecL99WVbky2Gu6o4no&oauth_verifier=83Ip3jrMVDvnbIY3RXS5DH1FUZrWAHddwApnOBfm4
The first time this page loads, it properly retrieves all the authenticated user info. But when I refresh the page, the all the user info disappears.
My question is:
Are the query string parameters oauth_token=o7gIh4x8xAs1mcms6OKthLoLecL99WVbky2Gu6o4no&oauth_verifier=83Ip3jrMVDvnbIY3RXS5DH1FUZrWAHddwApnOBfm4 all that's needed to gain write access to a user's twitter account? Can I store these tokens in my database so that the user never has to be prompted to sign into twitter again?
You had better keep oauth_token (and oauth_token_secret too) in your database since you will use them for all the authenticated requests you will do for the authenticated user. As for oauth_verifier, it is a parameter only used during the OAuth Authentication flow. So you can get rid of it once you have got the final tokens.
For further details (and to ensure what you are doing is right), see the corresponding "Sign in with Twitter" page on Twitter Developers website : https://dev.twitter.com/docs/auth/implementing-sign-twitter.
I have an application where i need to login to a website through facebook, twitter and the website's own login.
I'm not very sure how to login through facebook and connect it to the website. Like if i click on login with facebook button, it redirects to facbook login page( which is achievable with all the tutorials and information provided in the facebook developer documentation and the sdk) and then it is redirected to the website immediately after facebook login.
How to achieve this? Any suggestions or help to achieve this will well appreciated.
I also would want to know about the encrypted access token of facebook. How to use that access token. I have read the documentation, yet i have not got the concept so clear in my head.
EDIT: the website is already connected to facebook and twitter... I have to to the same on iphone.. I mean, the response i will get after login through facebook is an access token. Can i use this access token. How to link the response got after facebook login to the website to authenticate a user's login. This i need to do it in iphone.
Thanks in advance.
Here is an example on how to do it with php,
Facebook as Auth
EDIT:
As you mention you already have a website in place with facebook and twitter integration and only require to do it in iPhone.
For iPhone have a look at facebook sdk for iPhone.
What you get after a authentication from facebook in iPhone app will be a access_token. You can use this token to get the facebook userid. Match the same id with the one present in the website. This way you can validate a user.
For getting user details from acess_token try this.
graph.facebook.com/me?access_token=<token>.
This will return basic user information along with facebook userid.
Best of luck.