Tweet (or facebook) status update from iPhone with predefined Text - iphone

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.

Related

Facebook app id for website social plugins

I have like/share buttons on my website and am not currently using an appid. Finding information on whether this is a necessity for the above configuration is difficult to confirm. When going through the Facebook app "create" forms, I'm really confused by a lot of the requirements as it seems to be more focused around actual apps rather than websites, which login via fb etc.
In the past I have created an app for one of my other websites and I don't believe there was any verification/submission process at this point (about 2-3 years ago). Reviewing my old app configuration now I can see that it is not "live" - does anyone know whether Facebook implemented this submission process in the last couple of years, and then de-activated any live apps that were created prior to this?
I now want to setup a new app for my new website and I'm unsure what the different 'action types' mean and what I would need to simply use like/share buttons on the website. Could someone give me a quick run down of what I'd need and what they are?
Any other info/tips people can provide would be greatly appreciated. I'm finding that the like/share DO still work without the app, but sometimes the share button doesn't work properly (I have a feeling this is something to do with the app).
Thanks
If you are just using the Social Plugins, you don't need to have a Facebook App ID.
If you want more integration, it will be required. Creating an App ID is like registering your App, wether an iOS or Android App or just a website, so that you can make Graph API calls for it.
The easiest way to register your website is to go the quickstart: https://developers.facebook.com/quickstarts/?platform=web (or https://developers.facebook.com/apps). There you can type a name and follow the steps.
You can then follow the "Sharing best practices" (https://developers.facebook.com/docs/sharing/best-practices#tags) on how to use the App ID. For example, by including an fb:app_id meta tag on your pages.
There is a review process, since last April, but that is only needed if you use permissions for your App. If you just use the plugins, that is not needed.
Can you explain more what is exactly not working?
Update
The time you create a page the Facebook crawler does not know yet what the Opengraph data for that one is. This will happen after the first share, but if you want to ensure it is correct from the first share on, you can force a re-scrape.
This section explains how that works:
https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
When an app triggers a scrape using an API endpoint This Graph API
endpoint is simply a call to:
POST /?id={object-instance-id or object-url}&scrape=true

Facebook Logoff Not Working

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.

Facebook Application - Like Button

I'd like to develop a Flash/Flex based application that I'll integrate withing my Page on Facebook.
I've seen on many applications that in order for a user too see more stuff on the application, user first of all has to click LIKE button on my page.
I've searched but couldn't find right thing I've been looking for, probably I don't know how to search for it correctly.
Maybe you could help me out to find right source for that.
I don't think Liking the app really matter.
What you might be looking for is authorization from the facebook users. For instance if your app need to post status update on the user's wall, you'll need to get authorisation from him/her first.
You should probably read this (rather generic) intro on facebook's developer website:
http://developers.facebook.com/docs/guides/canvas/
This might be a helpful read too:
http://developers.facebook.com/blog/post/116/
Finally, haven't done it in AS3 but apparently Adobe has an as3 version of the facebook sdk available:
http://www.adobe.com/newsletters/inspire/november2010/articles/article6/index.html
http://code.google.com/p/facebook-actionscript-api/
what you are reffering to is liking a page beofore being able to interact with an application that has been embedded into a page. A page tab app.
You need to parse the signed_request that facebook passes to your application and once you have parsed it you will be able to see if the user has liked your page or not.
Here is a link to some more information about singed_requests

iOS Facebook Integration

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

Twitter OAuth Login Page on the iPhone

I have Twitter integrated into my application, with the help of Sharekit. Everything works pretty well except, if the user happens to tap on the "Sign Up" link on the Login/allow page, it goes to a non-sign up error page. Either a "Sorry that page doesn't exist" or "Hold up! Sorry the profile you were trying to view was suspended due to strange activity."
The account I'm using is working as far as logging in, posting etc. But that link seems to go off into space. Also if I click on the "Twitter Gear"/Application Icon the dialog (web view with the Twitter OAuth Authorize page loaded) just closes.
I can't find anything about how to configure stuff like this and everything else seemed to work pretty easily. The closest reference I could find was,this link Twitter API Issue 1045
Thanks in Advance for any help
Update:
I've been checking a few other apps with Twitter support. Most of the ones I've checked (TUAW,Joystiq,TFLN) seem to have rolled their own Twitter Login Page (using XAuth I assume) the one I found that uses the Twitter OAuth page (Shazam) actually takes you to mobile Safari and it exhibits the same behavior. Maybe I need to roll my own login?
I suggest you go into the ShareKit class files, go to the two .m files that have "twitter authorization" (im not sure which of the two it is, a simple search on xcode should find it) and change the invalid url that it is being sent to to this URL: https://mobile.twitter.com/signup
That should fix your problem!
I suggest using a packet sniffer on your device to determine the exact URL being called when you click the "Sign Up" link. There are plenty of ways to do this, but it is easier on jailbroken phones. Armed with the URL, you can see if it is potentially something you are doing wrong or indeed a twitter bug.
Try Jan Rain it makes it easy to integrate this functionality without errors.
http://www.janrain.com/products/engage/mobile
Here is a ShareKit folk I am using: https://github.com/baotuo/ShareKit
It looks do not have your issues and have much more improvement. You should give it a try.
When you implement twitter integration, you should not use the library which you used in older projects but download new twitter library. I had some problems with twitter oauth when I used older library. But after download and use new library, the issue was fixed.