I'm using the following Titanium OAuth Client for a Share with Twitter feature in our Android app:
https://github.com/jeremyspouken/Titanium-OAuth-Client
The client works till the PIN Code screen. Then, if I have a callback URL defined in my Twitter App settings, it will redirect the user to that URL.. which I don't want. I read elsewhere that to disable the callback, to set oauth_callback=oob, which also is undesirable as it closes the Twitter screen after the PIN Code screen without having done anything.
Can someone help me understand what's the point of callback in Twitter oAUTH for mobile application, and how to make it work with my Titanium Andoid mobile app? I am about to pull my hair out.
Redirect url can come in handy if you say want to promote your app or want the user who logs in to twitter via your app.
e.g for say angry birds, if you login to twitter then the redirect url can be say the angry birds twitter page.
you can prevent the closing of the web view by simply removing the call that destroys authorize UI from your oauth_adapter file.
not sure if this helps you. just let me know the comments if it does or not.
Related
the title pretty much sums it up. Is it possible to establish a connection with facebook using flash AS3 "only", without having to work with Javascript, html, iframes or any other externals.
The reason is a simple game I was making for android using AdobeAir that connects with facebook for leaderboard purposes. Works quite well, ofcourse with AdobeAir you get the flash internal webview and ANEs to help with the facebook communication. But outside AdobeAir, as a simple web-aimed swf file you dont.
Since I was hoping to make a web-version of the game and upload it to game-hosters, I was wondering if there is a way to make a connection and wrap it up in a single swf file, since thats what these sites want for upload.
Hopes are slim, yet I would appreciate any help on this!
You need some kind of web interface to load the authorisation dialogue from Facebook. This is a popup with content running within Facebook itself, if the user then authorises your app Facebook will send a callback where you can get the access_token.
This is explained rather rudimental, the point being is that the authorisation is on Facebook ends, this is the security. In AIR you use StageWebView, in a browser you load the authorisation URL in a popup, this is implemented in the Javascript SDK for you.
You can put a button in Flash, use ExternalInterface to call methods in the Javascript SDK and send the access_token back as a callback. If you have the access_token you can use AS3 to make API calls with it in the form of HTTP requests.
Is your application a Facebook App? If your SWF is running inside the Facebook Canvas, of course it is more convenient to get the login information directly through official Javascript SDK, but if you want, this may help you. https://code.google.com/p/facebook-actionscript-api/
Any request you can write in JS, you can code in AS3 also. I don't see any problems, since FaceBook has 100% documented API.
Does anyone of you know if it is possible to open a App which uses sharekit from a Facebook request by clicking on the request either in the facebook app, or in the browser?
I could not find anything about this in the web.
To be more precise i want my app which uses sharekit to send a request to a facebook-friend. This facebook friend should then be able to open the same app by clicking on the request either in the facebook app on his mobile device or by clicking on the request on the facebook browser page which is opened on his mobile device.
I already know how to share things in facebook via sharekit, but to get it "the other way round" seems to be difficult. I could not find anything helpful in the web so far.
Greets and many thanks in advance,
Maverick1st
Yes. Your will will need to register itself as a protocol handler, and the link clicked on from Facebook app would need to use the url scheme you define.
Example:
my-social-app://invite/1234
Keep in mind if the recipient does not have the app installed, or they do this on their desktop machine, they will get a message that the phone is unable to open that URL.
See this tutorial: http://mobileorchard.com/apple-approved-iphone-inter-process-communication/
I integrated twitter in my app through oauth engine. When opening the twitter view its displays the twitter login page by default. But that screen not going without login into twitter. When I want to quit that page that can't possibly goback to the previous view. How can I solve this?
I think you working with the example code which u took by googling.As per my knowledge, One example code was designed like until otherwise you give twitter credential, it will show twitter login page.
You just change logic as per your need and do your job.
I have an iPhone app using facebook connection using FBConnect from github code.
It worked fine in the simulator, however when I installed it in the device with existing facebook app from facebook it didn't work. It opens the existing facebook app instead of returning to my own app.
Checkout this link.
Better you can go with the approach given in the link as it works fine. I have myself tried this code and it has worked for me.
Also the sample project (with Facebook API implemented in it) is given in the below link which will be helpful for you to while implementing the facebook API as per the method given in the below link.
http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app
Also you can test the sample project on your device before going for this approach
Hope this helps you.
EDIT:
Have you registered a URL handler to respond to return requests from the Facebook app? on iOS 4 the Facebook SDK uses fast app switching which is designed to let the app handle most of the heavy lifting and let the users just hit "Accept" instead of having to re-enter login/passwords
I'm building an iPhone app that has some social features. I've managed to get the user to log-in to Facebook within my application.
I've also implemented a webview that loads a facebook iPhone-optimized page. What I now want to do is my user to be logged-in within the webview without having to log-in twice (once in the app and once in the webview)
I've tried a few things playing around with the access_token in the URL but it didn't work.
Does anyone know if it is possible to implement that and how to do it?
Thanks in advance for your help
Short answer: You're probably not supposed to be able to do that.
The idea is that your app should only store an authentication token that lets you do stuff as your app (e.g. post to the wall as your app). On the web version, the user is logged in to facebook and facebook additionally passes an authentication token to your website; on the iOS version, I think you never get the Facebook session cookie, and I'm pretty sure you need the Facebook session cookie to be logged in to the web side of things (especially since it's designed for the browser — logging out of Facebook logs you out of Facebook Connect on all sites).
There are loads of things you can do to work around this — it's trivial to just ask the user for a username/password (and the whole idea of a "trusted UI" inside a UIWebView inside your app is flawed, despite Facebook's claims).
The "right" thing to do is to implement everything using calls to the iOS SDK so you don't have to bother with the web side of things.
were you testing your app on the simulator or on the device? The reason i ask is because im trying to get the app to stayed logged into fb which it does, sorta...it still pops a fb dialog saying it logged in fine and the user has to click on an OK button.
I havent had time to test it on the device but i think it may have to do with the fact that with the OAuth 2.0, with 3.2.x or >...if the fb is installed, it uses the fb-app login but if its not installed it uses the safari web login.
Since simulator doesnt have the fb app installed, it actually uses the safari web login (i humbly deduced) which would otherwise store a cookie and maybe it doesnt do so on the simulator..dunno, im still looking for the answer on that one :)