I used Fabric for integrating twitter login in my iOS App.
For Login I am using:
Twitter.sharedInstance().logInWithCompletion { (session, error) -> Void in
if(session != nil)
{
println("Login Successfull");
}
else
{
println("Login Failed");
}
}
When I use this, it takes me to a login screen which is weird in its UI and my client is not accepting it. Is there any way to change it or any other way to login to twitter.
For sharing I am using following steps:
step 1-
var twitterClient:TWTRAPIClient = Twitter.sharedInstance().APIClient;
twitterClient.sendTwitterRequest(request, completion: { (response, data, error) -> Void in }
here request is a post request to “https://upload.twitter.com/1.1/media/upload.json” url on which I am uploading my image. This returns me media ID.
Step 2-
then again I use
twitterClient.sendTwitterRequest(request, completion: { (response, data, error) -> Void in }
here request is post request to “https://api.twitter.com/1.1/statuses/update.json” url. I am sending here pre received Media ID and some text.
Sharing is successful.