I have an app that I want to integrate with Facebook. It is a hybrid app with a native part and a javascript part that is in a UIWebView. I would like the user to be able to be logged into "both" parts. What is the standard way of handling this? Does the facebook sdk 3.1 natively handle this? Do I need some way of passing it in the url that I instantiate it with? Can I access NSUserDefaults from javascript? Can I create a custom handler to get at it?
I googled but due to common nature of words wasn't able to find anything that addressed this. I did read that LinkedIn's hybrid app actually ran a local server for accessing user data. This is more than I want to do. Any help is appreciated and sorry if this is addressed by Facebook SDK but wasn't able to find id.
thx in advance
Related
I'm not sure if it's possible. I'm currently developing an app the stores password (like a password manager). One of its features is to allow user to make an auto login to a web browser of that device. I was able to make it work using UIWebView and WKWebView but can't find a way to make it work using SFSafariViewController. I read few documentations and blogs about it and even read the SFSafariViewController.h but there's no clue in there that can lead me to the function that I wanted. I want to know how to do a "evaluateJavaScript"-a-like function in SFSafariViewController or if its not possible, do you guys have other suggestions on how to achieve this?
Note: I'm using Objective-C.
Thanks in advance!
Happy coding!
SFSafariViewControllers are sandboxed. As they are essentially Safari, and have access to cookies. It would be a security risk to allow any app to access these.
However, if the web-service you want the user to sign in to is yours, you can setup a API and a custom URL scheme.
Follow this documentation.
If you are trying to store passwords etc from sites you don't maintain then unfortunately, this is not possible using the SFSafariViewController.
Hope this helps,
Liam
I've been told to use Oauth2.0, but I don't understand what I am to do with it on either side.
I would specifically like to achieve the persistent login that Facebook and Twitter maintain in their respective iOS apps.
PLEASE give me a specific answer (and hopefully an example too!)
I know that this may be achieve with Oauth2.0, but I have been unable to find an example as to how (even after extensive research- if I could find the answer I wouldn't be asking the question here.)
Thank you in advance!
-John
Is there a way to post on the user wall without having to do login?
Going thought the documentation i can do this but the user has to do login, which i donĀ“t want cause this is a simple app.
I know there is a tutorial in the facebook developers website, because i found it and only later i realize that. Something using "publish_stream" permissions, if someone can point me in the right direction i appreciate.
It is not automatic (which would violate Platform Policy anyway), but you can use the Feed Dialog for this:
https://developers.facebook.com/docs/reference/dialogs/feed/
I'm trying to authenticate my user on FB with my app in a simple manner, the iOS SDK has this SSO explanation and that's pretty much it, and it seems a bit extreme since I pretty much have to wrap up my entire app in FB goodness, at least that's what they guide you through.
Is there just a simple way, be it with the SDK or some other manner, to guide the user through the OAuth process and retrieve the access token and user data, like name, email and birthdate?
One shortcut here is using something like Parse to handle it for you. They actually also include a very nicely made login view controller that does exactly what you're looking for. You can see it here.
I've never used the FaceBook SDK before so I'm not sure what I should be using or whether what I'm thinking of can actually be done. But I want to try to integrate some Facebook functionality with my ASP.NET MVC3 application.
What I need to do:
I want to be able to access someone's Facebook account (granted their permission) and allow them to send out invitations to my website. But, when a friend clicks on the link in the invitation message (whether a wall post, PM... whatever), follows through and registers on the site, I want to be able to track that (maybe by appending the ID or username of the this user to the invitation link, and then extract it from the query string when the invited person/friend registers).
Questions:
From what I've read so far and according to this link, what I think I should be using is the Facebook Connect API. Am I right?
Is what I'm trying to achieve actually doable? Basically, can I append the username to the invitation link? Is Facebook okey with that?
Do you have any good resources other than the Facebook Developer Wiki? Share them please!
P.S: I do not want users to login to my website using their Facebook account. I have my own Membership system. I just want to allow them to invite their friends to register at my website and track that. More requirements might arise but for now that is all what I need.
Your help is appreciated!
EDIT:
Ok I went ahead and created some test app using the Developer FB app to do some experiments. One thing I do not understand though...
Canvas Page: The base URL of your app on Facebook.
Canvas URL: Facebook pulls the content for your app's canvas pages from this base URL.
So what exactly is the Canvas URL? From what I understand, it's a URL to a resource (page?) on my website which Facebook can display inside the Canvas Page, is that correct?
yes
Yes
Facebook documentation + facebook developers forum, that should be all for you. Also, as you are using asp.net mvc, facebooksdk discussion will help you also if you use that library. I will stringly recommend to use that library.
Also, it seems, you are a beginner on facebook api with c#. If so, you can consider my blog post for beginners on facebook open graph api tutorial in c#. There also some other related posts also.Hope you may like them.
Let me know if you wanted to know something else also specifically.
Yes
Yes
Nope. The Developer Wiki has its issues but the Facebook Docs usually solve your problems.