Open bisht2ankit opened 7 years ago
Hi @ankitbisht143! We need to check it and add if available
Hi @ankitbisht143 ,
Yes, you can.
Change the lines 118-124 of the TPSTwitterModule.m file as below;
TWTRAPIClient *client = [TWTRAPIClient clientWithCurrentUser];
NSURLRequest *request = [client URLRequestWithMethod:@"GET"
URL:@"https://api.twitter.com/1.1/account/verify_credentials.json"
parameters:@{@"include_email": @"true", @"skip_status": @"true"}
error:nil];
[client sendTwitterRequest:request completion:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
NSError *jsonError;
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
NSDictionary *body = @{
@"auth_token": session.authToken,
@"auth_token_secret": session.authTokenSecret,
@"data": json
};
resolve(body);
}];
You can get the same response as https://api.twitter.com/1.1/account/verify_credentials.json.
Can we get user's profile pic url?