Need to share our application in all social site like Facebook,Twitter,google+ ..Using Share auth api we can share in Facebook and Twitter.
Share Auth API:
http://code.google.com/p/socialauth-android/wiki/GettingStarted
Not able to share in google+ ,is there any plugin available?
Now am using this sample program,not able to share using this.
https://github.com/imellon/Google-Plus-Android-Sample
Please help..
Google plus does not have a publicly available API yet although there are some options available at https://developers.google.com/+/mobile/android/
I would highly recommend not to use a unique SDK for each social network since they contain a lot of bugs, and are not very reliable.
If you just want to share simple text from your app to Facebook,Twitter,Google+ and so on... I would recommend to create a chooser to let the user pick which app from his phone he wants to user for sharing. It is simple, reliable and this is how it's usually done in android.
Sample code :
Intent shareIntent=new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT,"your text here");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "post title");
startActivity(Intent.createChooser(shareIntent, "Share..."));
This will display to the user, all the apps that are capable of sharing a text post. If the user has facebook, twitter and google+ apps in his/her phone, then it will show all of them and the user can choose which ones to share to.
You might be looking for Google plus sdk for android.
Sign in
Sharing
Write moments to your user's Google+ history
+1 content in your app
Related
New to android here but not to stackoverflow, i know this was asked before but hear me out first:
So regular Share through chooser:
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, message);
sendIntent.setType("text/plain");
No longer works!, facebook doesn't allow pre-filled text to be sent(so i understood).
BUT I've seen apps do it anyways, by first presenting a pre-filled dialog they created with the text and then showing a custom chooser for sharing.
I have no idea how they do that, i can't find any answers in the forums for pre-filled text share to facebook.
Worst part is, i want to share text with an image, like in this photo here.
Where can i get a good sample project / Tutorial for:
1. simple facebook share.
twitter and google+ sharing.
custom chooser.
Also, would like to hear your comments and regards on best practices with social media sharing AND using a chooser.
Cause i also want the be able to share to apps like WhatsApp and other of that sorts.
With facebook's new SDK you can no longer use ACTION_SEND to share text information.
You can post on behalf of the user but not pre-fill the text for a status update, at least i did not find a way to do that.
You must also have your app actions checked and accepted by facebooks policy.
The answer: Stop working with facebook untill they remove their app from the ACTION_SEND in the android chooser.
I'm able to create Interactive post by using sample example, as below.
Intent shareIntent = new PlusShare.Builder()
.setType("text/plain")
.setText("Welcome to the G+ platform.")
.getIntent();
startActivityForResult(shareIntent, 0);
when the activity starts it shows up window where user have to press share button manually.
Is there any way to post directly to Google plus stream by adding default recipients(Public/to circle) without asking user to press Share button.
For content that appears in a user's stream, that user must explicitly share it. Put another way, posting to the user's stream is to do something that the platform does not support. This is done by design because users want to be in control of what appears in their stream. Deceiving the user and posting to their stream or sharing without consent puts you in violation of the Google+ developer policy and your API client can be banned until you are compliant should you even find a way to do this.
More information and several related questions are:
Sharing on Google+ Stream covers passively writing to Google with app activities.
How do I post to Google+ from PHP?
How to post to Google wall
Google+ API for posting
Please post the feature request in the Google+ platform issue tracker and let the Google+ platform team know why you feel you should be able to do this.
how can I allow users to share the data(text data) they have saved in android app on their facebook wall through a share button within the app. I am not sure if I should use facebook android sdk device or share-intent. I will be thankful if someone could provide me with some information on this or tell me about any tutorials related to this.
Thanks
You can not share the text on facebook wall using intent in android. For to achieve this you need to use facebook sdk. Using intent you can share the text on email, twitter and can share the photo on facebook.
I used intent earlier to send text on facebook its was not working earlier.
As per the Facebook's Platform Policies, We cannot pre-fill the share dialog using Intent.EXTRA_TEXT. It is usually thought to be a bug, but as per a Bug Report filed here and also, here, Facebook clearly mentions that this is not the case (it's not a bug).
I found that we cannot add a caption to a photo we are uploading using Intents. The only way we can do it, is integrating the Facebook SDK in your App then photo with text caption will be shared on facebook wall.
To get started for facebbok sdk in android:
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
I am looking for something peculiar however useful to any app developer. I have a snippet of code in my AppName.java file however not working yet. So far it is close to what I am attempting however I want to allow the user to share the application name and download link via all the programs that appear from the action intent to twitter, facebook, etc. So I don't believe I should use emailIntent, I believe I should use sendIntent but I am thinking my entire code below is completely incorrect to do either and maybe should start over. Suggestions appreciated.
Again, I only want to share the app name, a simply message saying "I loved AppName" and the download link.
Intent sendIntent = new Intent(android.Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "Download AppName for FREE at https://market.android.com/details?id=com.CompanyName.AppName");
emailIntent.setType("text/plain");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getResources().getString(R.string.recommendation_subject));
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, getResources().getString(R.string.recommendation_body));
startActivity(emailIntent);
Try to use socialauth-android Android library for authenticating, updating status and getting contacts with social networks
SocialAuth Android is an Android version of popular SocialAuth Java library. Now you do not need to integrate multiple SDKs if you want to integrate your application with multiple social networks. You just need to add few lines of code after integrating the SocialAuth Android library in your app.
try to integrate facebook api so you can post any text you want on your wall
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?
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.
#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
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.