Giter Club home page Giter Club logo

Comments (14)

alexdd55 avatar alexdd55 commented on May 20, 2024

did you link to your bundle-identifier?

from swifter.

ZaidPathan avatar ZaidPathan commented on May 20, 2024

No, how can I do that.?

from swifter.

alexdd55 avatar alexdd55 commented on May 20, 2024
 self.swifter.authorizeWithCallbackURL(NSURL(string: "com.YOUR_APP://success")!, success: {

actually very easy, but took me also a long time to find out ;)

from swifter.

ZaidPathan avatar ZaidPathan commented on May 20, 2024

Unfortunately, I did that too...but it didn't help...

from swifter.

alexdd55 avatar alexdd55 commented on May 20, 2024

the callback url need to be your app and i guess you already have add the openurl stuff in your appdelegate?

from swifter.

ZaidPathan avatar ZaidPathan commented on May 20, 2024

Right,so shouldn't I use that in appdelegate?

from swifter.

alexdd55 avatar alexdd55 commented on May 20, 2024

thats fine.and the callback is your Bundle Identifier?
its is like
LTD.DOMAIN.APPNAME
and i put
LTD.DOMAIN://success
as callback.

from swifter.

ZaidPathan avatar ZaidPathan commented on May 20, 2024

No, I used myapp://success

from swifter.

ZaidPathan avatar ZaidPathan commented on May 20, 2024

So,LTD.DOMAIN://success will help me in login with Twitter app.?

from swifter.

alexdd55 avatar alexdd55 commented on May 20, 2024

yes, works for me,
i just recognized you want "appOnly" authentication.
i can not confirm it works the same way, because you need the bearer token and this might be handled slightly different?!
check out this link: https://dev.twitter.com/oauth/application-only

from swifter.

MHaroonBaig avatar MHaroonBaig commented on May 20, 2024

@ZaidPathan yes it is possible only if the user has configured his Twitter account in the Settings. You can then fetch his credentials from there and authenticate the user. @alexdd55 I've used the method here https://github.com/MHaroonBaig/Swift-Beautify in my sample application. The file is located here https://github.com/MHaroonBaig/Swift-Beautify/blob/master/Picker/DoneViewController.swift

from swifter.

ZaidPathan avatar ZaidPathan commented on May 20, 2024

Thanks Haroon bro,
I appreciate your and Alex's valuable response.
so is it not possible to fetch user data from installed app.(not settings account).?

from swifter.

MHaroonBaig avatar MHaroonBaig commented on May 20, 2024

No. The only possibility is when the user has configured his official Twitter account in the settings. You can do a work around. Like, many people don't know about configuring their accounts in the Settings section. What you can do is that, you can apply the check and fetch the credentials through the ACAccountStore. Then incase of any error, redirect the user to the settings screen manually so that they could enter their credentials there. You can then authenticate them using the credentials that they would enter.

from swifter.

ZaidPathan avatar ZaidPathan commented on May 20, 2024

Alright,
So, I'm closing this issue.
Thanks.

from swifter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.