0

I am trying to create an app that has facebook share(using facebook SDK) and twitter's tweet button(using Fabric). I know I could do it via intents, but I need to create buttons for this.

Facebook SDK provides a view to create the like button by using

<com.facebook.widget.LikeView 
............/>

But I couldn't find similar view to create facebook share button. Same thing is true for twitter. There are views for embedding tweets but no view for creating a simple tweet button. Is there a reason for this? Also to create my own tweet and share buttons, I don't seem to find official "f" and "twitter-bird" logo to use in the button. Do they provide this?

rockfight
  • 1,916
  • 2
  • 20
  • 31

1 Answers1

1

About Twitter Fabric, if you want send twitter button, you must implement it on your own. It's not hard, Just use your TwitterApiClient method update():

apiClient.getStatusesService().update(composeTweet.getText().toString(), 
                    null, null, null, null, null, null, null, callback);

Where's "composeTweet.getText()" is your EditText field, and "callback" is Callback<Tweet> callback. You can read more about it parameters from "dev.twitter.com/rest/reference/post/statuses/update".

If you want set Twitter-Style to your button, just add to button xml: style="@style/tw__Button"

Also, the documentation have an example, how to add entire TweetCompose activity. It may cause some troubles to implement, but you can use another example from here.

If you have more questions, you can find more help and useful info at "twittercommunity.com/c/fabric", because Twitter staff are answering there.

VadymVL
  • 5,366
  • 3
  • 26
  • 41
  • Thanks, after searching a bit, I too figured out that I have to implement it on my own. I think facebook share button is the same. I am not sure why both twitter and facebook decided to make it hard for us. – rockfight Mar 17 '15 at 02:53