I'm using MonoTouch (latest version) and I want to be able to allow the user of my app to make a wall post based on a log entry made in this app. All I need is a simple implementation so that the user can tap "Share on Facebook" (UIActionSheet) and then it logs them into Facebook (shows the login) and returns the token which I can then use to make the WebRequest to post to their wall.
I've seen the MonoTouch bindings on github but have no idea how to use it. Can someone please provide a simple sample of how to just login to Facebook to retrieve a token so I can post. I know how to do the post, it's the auth process that I'm not getting right.
Thank you.
Neal
Neal,
I have added a sample that replicates about half of the Facebook sample here:
https://github.com/mono/monotouch-bindings/tree/master/facebook/sample
I would recommend to use client-side javascript login more than native device login.
Sooner or later you might want an Android, Windows Phone or even Facebook version.
Having an In-App browser wrapper to deal with javascript and direct Graph API calls are easier for cross-platform implementation. Just from my personal experience.
Related
I've successfully implemented Facebook login with their Javascript SDK but was hoping that when used on mobile, the native Facebook application would launch. Will going through the manual flow here allow this behavior? This question seems to say otherwise but was vague.
I want to avoid using Android and iOS mobile SDKs because my situation is basically an OAuth within an OAuth and it would get messy. Any other approaches people think could work like redirect URIs or other OAuth magic would be really appreciated.
We know how to call Facebook Graph API v1.0 and are calling it in the iOS SDK (https://developers.facebook.com/docs/apps/upgrading) but new users are getting treated as though they're signing up with v2.0.
We know that once a user logs in via Graph API v2.0, there is no going back to v1.0 for that individual user (http://code-worrier.com/blog/changes-in-facebook-graph-api-2-dot-0/) but does anyone know if all new users to your app will automatically login through v2.0 and only previous users can login v1.0? We're using the Facebook iOS SDK v3.14.
Thanks so much.
New users signing up for your application since 4/30/2014 will return app-scoped id's. The version you use in the URL for the API request won't change that.
Here's what we found out: you can still log into / use the old version of the Facebook API (v1.0). The issue is the API version that gets called by your app depends on the Facebook iOS SDK version you are using in your app. So if you want to jump back to pre-v2.0 Facebook API, you need to be using an old version of the Facebook iOS SDK (3.13.1 and previous). They are all found here: https://developers.facebook.com/docs/ios/downloads
Keep in mind, Facebook is forcing developers to upgrade to v2.0 by April 30th of 2015. But, if you have a v2.0 headache now that you don't want to fix right away, this a decent band-aid solution. In our app, we upgraded the Facebook iOS SDK to get compliant with Apple's IDFA regulations, not knowing we were upgrading to v2.0 of the Facebook API. Since our app uses some features no longer available in v2.0, this was a huge issue.
Any users that may have signed up for your app while you were using v2.0 may need to delete app related info on Facebook so that they can log in fresh when you jump back to v1.0. This will allow you to get real Facebook user IDs and not app scoped user IDs.
The last small hurdle is that Apple is now rejecting many, if not all, apps that use the IDFA. All Facebook SDKs that use v1.0 use the IDFA (to my knowledge). The only way around it is to tell Apple that you are using it, but that it is attributed to a previously served advertisement (you do this on iTunes connect). See this article here: http://www.adexchanger.com/mobile/apple-throws-a-bone-to-app-marketers-blesses-idfa-for-attribution/
Again, this is not necessarily a 'proper' solution, but if you don't have the bandwidth / resources to fix your v2.0 issues right now, it can definitely help. Just make sure to get back to v2.0 before April 30, 2015.
I think i dug through the whole facebook sdk documentation but can't seem to find the way to get the users Phone number or Address. Is this feature removed, as of spoken in this thread where it's suggested it will be re-enabled in a few weeks (2011).
This information is not available via the Facebook APIs and will not be added anytime soon. If you want this information from the user you should prompt them for it after they have logged into your application using Facebook.
Here's a link to Facebook's APIs:
https://developers.facebook.com/docs/reference/api/user/
You can use the graph API explorer to gain a clearer understanding of what information is and isn't available.
We are working on an idea of a FB app which let's us retrieve youtube watch histories of app users.
I know there's the possibility to retrieve watch histories through youtube's api, but in combination with a FB app I couldn't find examples.
Any input on this is much appreciated, thanks!
These two are orthogonal. Since you didn't specify a language, I'll assume you're using Python.
Write an FB app using Canvas to display output to users ... I assume you are using Canvas.
Use the YouTube API and Python client to make API calls. You'll need to use a database or some other storage engine to link a user's Facebook API auth token with their Google auth token. Both are using OAuth 2.0 (though they are different flavors), so once you learn one, the other should be easy.
Before I answer anymore questions, it's probably a good idea for you to work through the getting started guides for both Facebook's API and YouTube API first. After you have some understanding of both, pick a stack and you should more or less be ready to go.
I'm working on a project where I want to post a wall message to the users Facebook page but the problem is that the program will run on a very limited system and the only way I have to talk with Facebook is via sockets in C/C++.
Anyone have any code examples of how to do this?
Asking for the username/password is no problem so I will have this but I would also like to be able to do all this without them having to add a application to there Facebook page.
All documentation on Facebook.com is for when you can show a web browser but there must be some way you can do this, right?
/Viktor
sockets <-> Facebook?
the right way to do that is using facebook's REST api or CONNECT. You could try to use oauth2 to authenticate and then make http calls. You can try to use curl. I don't think you can use sockets unless you are inside facebook's layer.