Issue showing tweet from app, iOS11



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:

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.