Hello to everybody,
I have create a simple iOS app that uses the iOS Social Framework (with SLRequest and only-native accounts) to tweet some messages. I works okey for most of my users, but some of the get the following error while posting the tweet (using SLRequest with API v1.1)
" Your credentials do not allow access to this resource. "
How can this be possible in an iOS with native iOS accounts? Is there anything I am missing?
My code for posting looks like:
NSURL* url = [NSURL URLWithString:@"https://api.twitter.com/1.1/statuses/update.json"];
NSMutableDictionary *params;
params = [NSDictionary dictionaryWithObjectsAndKeys:status, @"status",nil];
request = [SLRequest requestForServiceType:SLServiceTypeTwitter
requestMethod:SLRequestMethodPOST
URL:url
parameters:params];
[request setAccount:twitterAccount]; // A valid twitter account got from an ACAccountStore
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0ul);
dispatch_async(queue, ^{
[request performRequestWithHandler: ^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
…
}];
});
Is it possible to add an to add a twitter app consumer key/secret to the request?
Thanks in advance,
Ezequiel