Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way for social sharing in Android

I've been looking for a way to share information to social networks. I've found 2 possible solutions:

  • Look for installed apps and sent an intent (like android uses in it's gallery)
  • Use the socials network api

When looking for quick ways to implements i say use the installed apps for that but if it goes customization and generalization i think the second option is the best.

I've a hard time deciding if one outweighs the other or not.

So my question is: What is the best approach? One of the ones i suggested or a whole different way?

like image 578
Nick Avatar asked Jan 11 '11 10:01

Nick


People also ask

Is there an app that will post to all social media?

Hootsuite (Web, iOS, Android, Chrome) If you're looking for a complete solution to all of your social media management needs, Hootsuite will cover all your bases. The app is compatible with over 20 social networks, including Facebook, Twitter, YouTube, Instagram, and Pinterest.


2 Answers

The Android OS uses intents to do this... While searching for an answer to this question I came across:

Social sharing on mobile

Quoting @NewProggie

Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpeg") // might be text, sound, whatever
share.putExtra(Intent.EXTRA_STREAM, pathToPicture);
startActivity(Intent.createChooser(share, "share"));

Depending on the MIME type you put in for setType, the chooser will show email, gmail, SMS, twitter, facebook, flickr, or whatever!

This is the easiest way to share content for the developer, and a proven method.

like image 166
Evan Leis Avatar answered Sep 21 '22 18:09

Evan Leis


I have worked with the Facebook API and I know that it's a really good one. It looks if a native Facebook app is installed, if not it pops a little popup on your screen where it does it things, if yes, it uses that app to do your things.

I think you have to take the same approach for all your Social Networks: check if app exist. if yes, use. if no, use own implementation

like image 39
Galip Avatar answered Sep 20 '22 18:09

Galip