Twitter Deep linking doesn't work when image is shared along with the url



Twitter Deep linking works, when story url is shared in Twitter. But doesn’t work when same story is shared along with the image. I tried sharing the same news with and without image. When shared without image, deep linking worked perfectly. But when same story is shared with image, deep linking is not working. On clicking on the link, it directly opens in the browser. I have used below code to send share intent :

          Intent intent = new Intent(); 
          intent.putExtra(Intent.EXTRA_TEXT, item.title + ":\n\n" + deeplinkUrl);
          intent.putExtra(Intent.EXTRA_STREAM, item.imageUri);

Is there anything specific to images must be done for deep linking to work ? Deep linking works when shared in other platforms.


What deep linking are you referring to here? what is the value of deeplinkUrl in your code above?

Generally speaking, if you are using a card, then an image will override the card (a Tweet can only have one logical “attachment” displayed at once, whether that’s an image or a card or a poll or whatever).


I’m referring to Twitter deep linking. I’m sharing the story url, along with image. The html page of the url uses Twitter Card. So when image is shared, deep linking is not supported ?


So you want to share the URL to a page with a card, and also add an image to the Tweet. (deep linking usually refers to linking into an app, which is why I was confused - apologies, and thanks for clarifying)

Only one of those attachments can be displayed below the Tweet, and the image will take priority in this case.


No…I want to share the url with image. But the html page of the shared url uses Twitter card. There is no way to set priority to the url over image ?


You can either share the URL on its own, which will cause the image from the Twitter card to be shown; or add an image, which will cause the image to be shown, and not the Twitter card from the URL.


Thank you for updating me on Image issue. There is one more issue, I’m facing currently. We are trying to support deep linking, for Live TV too. We have created a test html page and added the meta tags needed for deeplinking. But It’s not listing our app and redirects the user to WAP page on click of twitter card. Below are the tags, we have used :

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@site"/>
 <meta name="twitter:url" content=""/>
  <meta name="twitter:app:url:googleplay" content="testapp://type=player/channel=channel 24X7"/>

where testapp is our scheme. This is the url , we used to test deeplinking :

Are we doing anything wrong ? When same tags used for other stories, deep linking works. Only , for Live TV, deep linking is not working.