I am working on simple facebook integration that allows users to post high scores to their wall. The way doodlejump handles this is my inspiration. I have it functioning, but it's not very clean and I'm not sure what to do.
I followed the instructions at http://developers.facebook.com/docs/guides/mobile to get up and running. One of the first things it has you do it call [facebook authorize:nil delegate:self]. After that you can call [facebook dialog:#"feed" andParams:params andDelegate:self] to make a post to the users wall. I have two issues with this.
First, when you call authorize it exits your app as that is facebook's new desired methodology as part of "One Single Sign-On" (OSS). That ok, what isn't ok is that my app is doing this even if the user is already signed on. I do not see a way to check if the user is already signed on.
The second issue is that it exits my app to authorize my app to post something to facebook. It seems acceptable to exit the app to sign on to facebook. Most users will have already done this, so no big deal. But my app should not have to exit just to get user authorization to post something. DoodleJump doesn't do that but I'm not sure how.
I tried digging through old posts but the SDK has changed so a lot of them are no longer valid. Thanks.
Based on the latest Facebook SDK (located at Github) and it's example I have determined that this is the expected behavior.
It is built around the new fangled "fast app switching" so it looks like that is just what happens.
A little lame imo but if that's what Facebook engineers have determined to be the optimal process then so be it.
I was having the same problem. Turned out it was because I hadn't set the URL Schemas in info.plist Where it says to fut fbYOUR_APP_ID make sure that you do this how they say. Your plist file should say something like fb12345 and then it will identify that the user has logged in correctly. offline_access will then work as a result
Might not be the answer you are looking for, but the app 'Hipstamatic' connects with facebook for photo upload (which I assume/hope is a similar process as wall posting) from within itself.
It could be worth seeing if they would be able to guide you if you sent the devs an e-mail?
I think they solve this issue by calling an iframe of sorts within the app, connecting the app to facebook and performing facebook activities, then closing once complete.
Hope this helps!
What permissions are you requesting? If you don't ask for offline_access the framework will make the user log in each time.
You can also try ShareKit
It's an open source library for iOS to share links, images and more. It's very simple and also works with Twitter and other social networks.
The site also contains some video tutorial and some code examples to integrate the Facebook API, Check this
Related
I have this really odd problem. The bosses in the office decided to do facebook tracking by using the [FBSettings publishInstall:<appIDhere>] in the app delegate. This works because the graph.facebook.com/<appID>/activities, etc are called, and Facebook returned true.
However, the problem is that this is NOT showing up in the dashboard. The app_activate shows up just fine, it's just that the app install is not showing at all.
So, my questions are:
Why is it that the install is not read correctly? The call is made and facebook response. Why is it that it's not showing up in the dashboard?
Does facebook do any other filtering? For example, if I delete the app and then reinstall, should the app be counted to have installed twice? In this case, the call to graph.facebook.com/ is made twice to send the MOBILE_APP_INSTALL activity. After this, does facebook do any other filtering? e.g. they remember device tokens, etc?
I am not quite sure how facebook differentiate using the URL scheme. I presume that this is to differentiate people who upgraded compared to people who installed. How does the fb<appid> help as a URL Scheme?
Thank you in advance for all your help.
I am trying to build a Facebook/Twitter application that allows the user to take a picture at a trade show for example. Then enter their facebook or twitter credentials and a comment and have it post to there site. I have messed around with the facebook side of things and can get it to work but logging the user out doesn't work as I thought.
The cookies are stored in Safari, this is fine but of course my app cannot get them.
Each time the user is done posting it needs to correctly log them off so the next user doesn't just relog back in as the prior user because of the cookies in safari. This almost needs to be a Kiosk like app.
I have been looking at this topic for about a week and all the old examples are relevant to the old FacebookSDK. I have looked at the examples provided by Facebook to no avail. Any help or pointers would be GREATLY appreciated. I
UPDATE:
I was looking into something like UIWebView to display facebook and then the cookies would be available to be deleted... Has anyone done this recently? I found some old examples but they do not work.
Update: I might have this working I am stuck on something else now but will post the answer to this question as soon as I finish! Should be next day or so.
I am using the facebook-iphone-sdk framework to integrate my iPhone app to FB. The problem is when I click the button it gives an error "The application you are using is misconfigured for the Facebook integration. Please download the latest version of the app."
I was able to connect with FB only once. For the first time it worked fine and I was also able to post some data into my wall but afterwords it not working, and the above error occurs.
What could I be doing wrong?
The Bundle ID is case sensitive so watch out for that.
e.g. com.myapp.MyApp is not the same as com.myapp.myapp
This happened to me and gave the same error message.
May be you are using the deprecated API of facebook... Please use the New FBGraph API for facebook integration ....
How to share or post by mail, twitter and facebook from the current application?
This is not only about email... here you will find the tutorial and sample code for facebook integration.....!!
Possible Solutions:
1) Double Check that you are putting in the right facebook app id in your code, and that you didnt somehow overwrite that when you made it work the first time.
2) Check that in the facebook developer profile you have all the proper things set up (They have decent doc's for how to set up properly).
3) Check that you are using the most up to date version of the SDK for fb.
4) Consider using the built-in Facebook for iOS6, since you probably wont be releasing your app before iOS 6 comes out anyways.
5) If all else fails, start over and go through the instructions from beginning to end. Check and re-check everything you set up and carefully scan for little typos or something. It's probably a minor mistake somewhere that you're overlooking.
6) Post code if you want more specific help. An error message isnt enough to deduce what your problem is.
Just delete you app from facebook dashboard, create it again, and then change the facebookID in you App-Info.plist, in the key FacebookAppId and URL types array key. I did it and my app works fine.
Delete facebook app, force perform login in safari..
I am using FacebookAgent by Amanapps. It is a nice little wrapper for Facebook integration in iPhone apps. So far everything is peachy. But I noticed that when I upload a photo to my account, Facebook does not automatically publish it to the wall, instead Facebook puts it on hold and I need to goto See All Photos and approve them first.
Is there any way I can bypass this "approval" method. I feel it is ridiculous since upon logging in, the user has already give consent to the "app" to post the photo.
Thanks in advance for any insights.
Ok, anyway, I had to move away from FacebookAgent since in latest FB SDK, FacebookAgent is no longer updated. I ended up coding my own Facebook usage in the app using latest SDK with SSO. I even wrote a tutorial for it, for those who'd like to know how to do it please visit: http://xcodenoobies.blogspot.com/2012/09/how-to-upload-photo-and-update-status.html
Thanks.
Hey,
sorry to bother you again, but I can't get this to work and would appreciate a working example project.. I try to give my users the possibility to post a short, predefined message from inside my App on either twitter or facebook (both should be available, but it doesn't have to update both on the same action, so one button to "share on facebook", one button to "tweet about it", so if you have a solution for facebook, but not for twitter or vice versa, I'd happily take the solution you have, either facebook or twitter and go on searching for the other one). It's my first time trying to interact with facebook and twitter, so I need something like dummy-proof explanation.
I found MGTwitterEngine but it seems to be hell to get it working. I've found Ben Gottlieb's Twitter OAuth-iPhone bundle, inserted my data, "registered" my app, and stuck with a gray screen on my device.
I'd need a working example of an iPhone App Project, that manages to tweet or update the facebook status of a user (maybe after a short and painless(!) login). Than I'd happily fiddle around myself to get this working, but by now I only find links to Desktop-Applications, examples or demos that won't work out of the box, or expect you to have done this several times before -.-
Thanks for your help, and sorry if that is an easy question, but I can't find the answer I need..
Perhaps the easiest way to be able to publish to a number of different services is ShareKit. This supports sending messages to Twitter, Facebook and a bunch of other services.