How to add Shared via [my app] when sharing content from an Android app to popular social networks?

余生颓废 提交于 2019-12-24 14:28:20

问题


My Android application allows users to read full articles from various blogs and share the posts using Android's in-built sent action:

Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);

When I share an article, Twitter indicates it is shared via Twitter for Android, and Facebook simply has an RSS icon with no "shared via" at all.

What is the procedure of getting my app's title to appear next to "Shared via" for those social networks?


回答1:


With Twitter you'd need to do the sharing directly through your own application, the API key you use to share with is associated with the 'shared via' link. If you share through another twitter application like Twitter's official app or TweetDeck then the 'share via' link will be to their app as the article was shared using their api key. There are libraries and tutorial on how to implement twitter api yourself.




回答2:


@ernes7a this is an old question so don't know if still relevant. Socialize handles the "shared via" text. You can check it out at http://www.GetSocialize.com & full feature list at http://go.GetSocialize.com/features

DROdio




回答3:


To get your name into the networks, i doubt that you can use the built-in sharing feature. In both cases (facebook or android) the application actually submitting the content (post or tweet) to the network gets the icon / mention. In case of using the built-in method, that will always be the twitter for android or the Facebook android app. You'd have to implement the sharing yourself. Have a look at pulse or other apps, that use these kinds of features.



来源:https://stackoverflow.com/questions/4337475/how-to-add-shared-via-my-app-when-sharing-content-from-an-android-app-to-popul

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!