0
votes

I have a twitter timeline box on my website, showing my latest tweets. I've also linked my facebook and twitter accounts so that when I tweet, my facebook page gets a post comprised of the tweet. When a user visits my website, they see the twitter timeline, and can retweet/favorite/follow. So far so good.

The only problem is that I would like them to also be able to Like the tweet/post. Remember that the two accounts are linked, so for each tweet there's a FB post. What I would like to do is get rid of the simple timeline box, use twitter's REST API to get my list of tweets, and build my own timeline "box". Then I could, in theory, have FB Like/Share and twitter retweet/fav/follow buttons for each entry.

I can get the list of tweets, and I can get the list of posts, but how do I match them up so that I know I'm dealing with the same item? I don't see any cross product ids (e.g. tweet id xxx posted to FB id yyy). Without a link between the two lists, I don't know how I can offer both fb and twitter social goodies (like/share + retweet/etc).

Here's the workflow I'm after:

  • I go to my twitter account, and post "blah blah blah"
  • "blah blah blah" automatically gets posted to my facebook page

  • a visitor comes to my website, and sees "blah blah blah", with options to retweet/favorite (which I apply to the corresponding tweet), or share (which I apply to the corresponding facebook page post).

1

1 Answers

0
votes

Well, as far as I can tell, the answer to the title of this question is 'no'. So what I've done is:

  1. get the tweets from twitter api, which gives me a tweet id
  2. add the fav/reply/retweet buttons below the text, linked to that tweet
  3. add a facebook like button that has the entire web page as the target url, as opposed to linking to a facebook comment over on my facebook page.
  4. Add a FB feed dialog that includes the text of the tweet, but again has the web page as the URL, not the original comment on the facebook page.