Skip to content

PFTwitterUtils no longer working after Twitter changed callback #1310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TechMindsYT opened this issue Jun 13, 2018 · 12 comments
Closed

PFTwitterUtils no longer working after Twitter changed callback #1310

TechMindsYT opened this issue Jun 13, 2018 · 12 comments

Comments

@TechMindsYT
Copy link

My ios app was working with PFTwitterUtils up until yesterday when Twitter can done something to the Callback urls. I'm only using PFtwitterUtils for signup or log in to my app but now i get the error message "Failed to request authorization token from Twitter" when trying to invoke the twitter sign in screen using [PFTwitterUtils logInWithBlock:^(PFUser *user, NSError *error).

From previous documentation I read the "Enable Callback Locking checkbox " must be unchecked on my twitter app @ app.twitter and a valid callback url. It would appear from Twitters recent announcement that they are going to remove the checkbox and force all to enable callback locking.

Is there something I can do so fix this? Or is this an issue that needs to be resolved in PFTwitterUtils?

Thanks,

@flovilmart
Copy link
Contributor

So we should probably adapt in the SDK for those new changes. I wasn’t aware

@flovilmart
Copy link
Contributor

Do you have more informations regarding recommended twitter login flows etc... ?

@TechMindsYT
Copy link
Author

TechMindsYT commented Jun 13, 2018

I only just found out about this when I was testing the login features of my app and a search bought me to the following tweet from twitterapi:

https://twittercommunity.com/t/action-required-sign-in-with-twitter-users-must-whitelist-callback-urls/105342

I cant seem to find any information about mobile apps though as Im sure the callbacks where just for web based authentication.

@flovilmart
Copy link
Contributor

So I believe everything should work as expected if uou’re following the guides from twitter to setup the authentication Correctly?

@TechMindsYT
Copy link
Author

TechMindsYT commented Jun 13, 2018 via email

@flovilmart
Copy link
Contributor

I won’t have time to look into it in the coming days. So feel free to investigate also acquiring an access token from twitter without the Parse SDK.

The iOS SDK let you provide any custom authentication provider, so if you manage to acquire a valid authentication, you can still move forward using it.

@btanev
Copy link

btanev commented Jun 14, 2018

Hi @MMSSolutions

I had a similar problem recently, i'm not using the ParseTwitterUtils but the twitter SDK and this also happens.

The solutions was to add the callback url you use in your application (or Parse Twitter utils uses) in https://apps.twitter.com

For the official twitter SDKs the callback urls are (this is from a tweet):

Callback URLs will be required to native apps too. If you are using custom URI scheme just enter the scheme as the callback URL. twitterkit-<consumerKey>:// if using Twitter Kit for iOS or twittersdk:// if using Twitter Kit for Android.

Just from a quick search in the code of Parse Twitter Utils I've found this (method: _getRequestTokenAsync:(BOOL)isReverseAuth):
https://github.com/parse-community/Parse-SDK-iOS-OSX/blob/master/ParseTwitterUtils/ParseTwitterUtils/PF_Twitter.m#L191

It looks like you have to add the following URL as a callback url in you twitter app configuration:

http://twitter-oauth.callback

@flovilmart
Copy link
Contributor

It looks like you have to add the following URL as a callback url in you twitter app configuration:

This looks like it would work, I believe, let us know @MMSSolutions , we'll add it to the docs if that's all good with that.

@TechMindsYT
Copy link
Author

Hi @btanev @flovilmart

Thank you so much! For me, in my test application it is now working. Now I will get my client to add to their callback url.

Thanks again!

I think some of the PFTwitterUtils tutorials out there will need updating for this as not ANY valid url can be used anymore.

Cheers!

@flovilmart
Copy link
Contributor

@MMSSolutions do you have any link to the existing tutorials that could help us put the right URL's there?

@erinlee1109
Copy link

erinlee1109 commented Nov 17, 2021

The documentation for PFFacebookUtils and PFTwitterUtils disappeared, and the repository has been archived. I guess they are deprecated..?

@MuhammadBilalShakoorIlsa

can any one help me out in how tto login with twittter using pods cause PFTwitterUtils and twiter kit not working
because twitter X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants