Display the Latest tweet on Sharepoint

restapi

#1

Hi,

I am working on displaying the most recent tweet of my company on our company Intranet which is on Sharepoint. I am confused and stuck on the process of getting the data.

While i tried registering a widget in my twitter and copy the code snippet on to my Sharepoint site, it works perfectly fine and shows all the tweets of my company. But my requirement is to show only the recent tweet on my intranet for which, i understand for this i have to use the rest API to make JSON call (https://dev.twitter.com/rest/reference/get/statuses/home_timeline ). However the problem is the API requires user authentication and i cannot expect all 50000 users to authenticate when they log into twitter from the intranet to see one tweet. While all the tweets are available to public to see with just a code snippet, i am clear why there is authentication to filter and see 1 tweet from that. Can someone suggest me if there is a better way for me to read the latest tweet and dynamically display on my company intranet.

thanks in advance for the response.


#2

You should not need to use the REST API at all here - just use publish.twitter.com and create a web widget that you can embed into your site.


#3

Thanks Andy for response. But my requirement is to show only one tweet and nothing else, with the embed i dont have that flexbility. Also, i have an unique UI to show the tweet hence i have to go with API to get the response and render. My concern is the moment i go to REST API for selective tweet, i have to work with authentication. So, i am looking for a workaround where i can still get only one (latest tweet) and i am able to get that as a public API not using authentication even if it is app-only policy token.


#4

What about if you add the tweet-limit=1 parameter to the embed code? That will show just the latest Tweet.