Issue showing tweet from app, iOS11


#1

Hello:

We have integrated sending tweets into our iOS application. With the removal of support by Apple for SLComposeViewController for Twitter (and Facebook) in iOS 11, we downloaded, installed and got working with the Twitter SDK.

We are using cards for our URLs/tweets, with all the meta tags set appropriately in the URL content. The URL passes in the Twitter validator. For example:

https://cms.driftscape.com/newsatlas/naFeature.php?etoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvZHJpZnRzY2FwZS5jb20iLCJhdWQiOiJodHRwczpcL1wvZHJpZnRzY2FwZS5jb20iLCJpYXQiOjE1MDg0NDAzODAsInBheSI6IlptSmN4V0JYano2UFVyVGZmMnVaWGtTMTJGSUE0K09DY1poajJSSHUzK0ZQWk5MQXQ0bEVoSEJDbUYzazAxVFR1V21uQmh5VjhRWGJzaDhNN0FFa2lpcjlMc3ZyWDU1cmdiZnJadmVwU2U4VjZSdFZCbm5rSmZzUzVJRXpaaVJGIn0.Unr2VwI1nzcwk4pUZZRfSPTDkh5mSqptVyiaLen9MTM

But, in our app, when we bring up the tweet to send, we do not see the card image or description text for the url:

This is running on an iPad, although it also fails on other phones and even older OS devices (OS 10.X).

Our code to send the tweet is very basic:

			NSURL *full_url = [NSURL URLWithString:url_str];
			
			TWTRComposer *composer = [[TWTRComposer alloc] init];

			if( ![composer setURL:full_url] ) {
				LogError( @"Can't set twitter URL" );
			}
			[composer showFromViewController:parent completion:^(TWTRComposerResult result) {
				if (result == TWTRComposerResultCancelled) {
					LogInfo( @"Tweet canceled" );
				} else {
					LogInfo( @"Tweet sent" );
				}

We are using setURL on the TWTRComposer composer. Oddly once we tweet that URL, if we do it a second time, the tweet image shows up (but not the description). In either caseā€¦ the tweet is sent properly, and shows up with the proper card elements in Twitter (which is not surprising, since the URL passes the validator).

Any knowledge or guidance on this issue would be appreciated.