I’m trying to present a TWTRComposerViewController that will allow the user to share an image (and optionally enter text) using code taken directly from the Fabric documentation. I already have Twitter login and server-side sharing implemented and everything works fine (including the native twitter share sheet provided by iOS). Every time I present this card and hit “Tweet” I get the following error:
Error Domain=TwitterAPIErrorDomain Code=200 "Request failed: forbidden (403)" UserInfo={NSErrorFailingURLKey=https://caps.twitter.com/v2/cards/create.json, NSLocalizedDescription=Request failed: forbidden (403), NSLocalizedFailureReason=Twitter API error : Forbidden. (code 200)}
Here’s the code I’m using to present the composer:
NSString *userID = [[[[Twitter sharedInstance] sessionStore] session] userID];
// Will be a user generated image later on
UIImage *image = [UIImage imageNamed:@"UserGeneratedImage"];
// Create the card and composer (in my actual code, I use the real App Store ID obviously)
TWTRCardConfiguration *card = [TWTRCardConfiguration appCardConfigurationWithPromoImage:image iPhoneAppID:@"SampleAppStoreID" iPadAppID:nil googlePlayAppID:nil];
TWTRComposerViewController *composer = [[TWTRComposerViewController alloc] initWithUserID:userID cardConfiguration:card];
// Set self as the delegate
composer.delegate = self;
// Show the view controller
[self presentViewController:composer animated:YES completion:nil];
Any idea why this would be happening? I already contacted the support and they first told me that it was because my app account was suspended but after inquiring further, I’ve been told multiple times that this is actually not the case and that my account has no suspensions of any kind on it and that I should be able to post tweets without issue.
Thanks for the help!