how to avoid twitter already authorized on the device using share kit in iphone sdk - iphone

I used sharekit for twitter integration in my app. That works fine on the simulator. But on the device , for the first time it allows me to login into the twitter . Now i deleted the app from the device and create new build and deploy that into device again. Now it shows already authorized for twitter , not able to login even i deploy the new build on the device
Any ideas..to avoid this.
Thanks in advance..

The data for Sharekit's Twitter implementation are stored in the user's keychain when you run on the device. Because of this, deleting the app will not delete the token for Twitter stored in the keychain by Sharekit. When you delete and reinstall the app, it's still reading from the keychain and picking up the old credentials. You need to implement the logout functionality. The implementation is pretty simple. You just call
[SHKTwitter logout];
Check out the ShareKit documentation for details and options.

Related

App is misconfigured for Facebook login IOS Facebook app installed

I saw this linkenter link description here
But it doesn't solve my problem.
I downloaded the latest Facebook sdk 3.1.1
The original SessionLoginSample provided with sdk works fine.
I made the following changes and the result is: App is misconfigured for Facebook login
Where is my mistake?
I created a new sample Facebook app following step by step the Facebook doc:
Facebook App Image on Flickr
I loaded in xCode the original SessionLoginSample and I changed only the bundleId and the Facebook ID:
xCode plist image on flickr
i experienced the same problem many times.
First make sure you have your Facebookappid set in your property list correctly.
Then go to facebook account settings and delete your ios app from applications.
then go to developer settings of facebook for your ios app.Make sure the app id is correct and also make sure that the bundle identifier is also same as your propertylist in xcode.It should be working afterwards
UPDATED : You do not need to delete the app.Try delete the app from your Facebook settings first.Then go to your Facebook app on iOS and log out.Remove your own app from the device and reinstall (without loving in to your account).Then you try to connect from your own app Facebook will prompt and ak your username and password and it will not return to your app.You clsoe the app and return to your own app manually.When you try to connect again in your own app FB it will ask you for permissions.
I reproduced the problem somehow and fixed like this.
By the way i also set the App Type: setting in advanded settings to Native/Dssktop.
Make sure you configured your app properly as per the following guidelines https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/ Check whether you bundle id is as per you configured in the Native ios settings of app configuration.

Google+ OAuth2 on iPhone how to logout

I am writing an APP where students can login using goole+. I followed GOOGLE Developer and successfully logged in and obtained the user profile information. Now I am trying to logout. I deleted the Application, signed out of all google accounts on safari , iPhone , cleared cookies, history logged in with a different google id but even after all the steps I am getting a refresh Token from google and it is returning me the same user profile with which I logged in of the first time. I know it has an expiration time but I wondering is there no ways to log out of it before the accessToekn expires on its own.
First, are you using the Google+ Platform iOS SDK? https://developers.google.com/+/mobile/ios/ This is your best resource for iOS development with the Google+ Platform API.
Then you'll have access to functions such as signOut https://developers.google.com/+/mobile/ios/api/interface_google_plus_sign_in, which clears out the OAuth 2.0 token from the keychain.
(Sometimes I wonder if anyone reads these posts before they answer)
To log out, in Google+ on IOS (Iphone, IPad, etc.), in G+ got to settings (Google+ settings, NOT device settings) and select SIGN OUT. That simple.

Facebook connect integration error

I am integrating facebook into my iPhone application.
Single sign on method works when i sign in via safari.
But after i install facebook app and click "Connect to Facebook", app taking me to Facebook app. And there is a error message on top
" is misconfigured for Facebook login. press okay to go back to the application without connecting it to facebook"
What might be the problem?
Please advice, Thank you.
So, this is probably going to sound like two of the lamest potential fixes ever, but I just had this problem...
I went from using the previous version of Facebook iOS SDK to the newest one, and one of the few things changes I made was adding the FacebookAppID && 4*******7. So, I deleted the APP ID and tried again and it worked. I recommend you check the AppID and spelling of FacebookAPPID in your plist.
Do you have multiple versions of your App on your simulator or device? Delete the old one and it might fix it, it was kicking me over to an older version of my app, and trying to resign me into the app when I was already signed in.
Hope it works for you,
Eva

Testing Facebook Native iOS App

I would like to integrate Facebook into an iOS application I am building, however it seems there is no way to set up a Facebook 'Native iOS Application' with an iOS application that is not already published and available in the App Store.
When I Set up a Native iOS Application for my Facebook App from my Facebook developer's account it requires that I fill in my App Store ID. However when I submit I get the following error message:
Your iPhone App Store ID is invalid because the iTunes App Store
reports your app as being unavailable for iPhone and iPod touch.
I have set up my application on iTunes Connect, but I have not submitted my binary yet as I am in the process of building it, so I assume that this message is due to it being unavailable on the App Store.
This seems like a catch 22 situation. I can't test my app until its in the App Store but I can't get my app in the AppStore until I have tested (and built) it. How can I test my iOS application with Facebook before release?
I've been there, but the solutions is simple.
Don't fill out the Facebook 'Native iOS Application'!
For testing all you needed is the Facebook appid.
Later on in the Deep Linking portion of the iOS Facebook Tutorial, it also mentions the AppStore ID and that you can use somebody else's ID temporarily to get all the data to save. They just say to make sure you use your own id when you finally do publish the app.
I dont think facebook Native iOS App settings are necessary. I have done facebook login with it in two of my apps and without it in one of my app and all are running well. Here are workaround by me:
Native iOS Facebook SSO won't return to app

Facebook Authorize not working on free version of app

I have a free and paid version of my app on itunes but as the free version has in app purchase I cant use the same bundle id across the two apps and therefore the only way I can see of adding facebook to the free app is having a second facebook app registered?
I have done this but for some reason when calling [facebook authorize: permissions] my app boots up the facebook app but returns straight away to my app, not getting in to any of the handleOpenUrl functions or even asking the user for permissions. The code is identical line by line to the paid version of my app with the only difference being the appID that is used. Any ideas what would cause this? Facebook did work on both apps until the recent updates.
After further playing around with this code I have found it works if I tell it to not use the FB App and to instead use safari authorisation. Still failing to see why I can use the app on one app but not another :s
Log in to developers.facebook.com and check your iOS bundle ID for your free app carefully. Make sure the bundle ID you tell Facebook is exactly what your app thinks it is. If it's not identical, the new Facebook app will not allow your app to authenticate.
You can have multiple iOS apps use the same Facebook app. Check this link..
https://developers.facebook.com/docs/mobile/ios/build/#multipleapps
There are three steps:
Add the additional bundle id in your apps "iOS Bundle ID" file in your faceBook app settings.
Then in your iOS apps, use the 'urlSchemeSuffix' option in the 'initWithAppId' method.
Modify the URL Schemes property in the info.plist.
The link explains it in detail. No need to register a 2nd app with Facebook.
Hope this helps.