read user timeline

Jun 7, 2013 at 3:41 AM
Hi, I am searching the web for 2 days now.
I need to replace the twitter web part on my corporate intranet site which is SharePoint 2010.
It seems impossible to find out what I need to do to get it done with API 1.1

I could work out your "WebFormsTimelineDemo" sample to get the Oauth work properly.
but still, I can't read a user timeline.

All I need is to read a public user time line, and show their latest 5 posts.
Please if you can, direct me to the right way.

Thanks,
Sarah
Coordinator
Jun 7, 2013 at 3:49 AM
Hi Sarah,

If you're referring to the old Public timeline, that doesn't exist in Twitter API v1.1. However, there are other timelines available. Here's the documentation for the User timeline:

https://linqtotwitter.codeplex.com/wikipage?title=Querying%20the%20User%20Timeline&referringTitle=Making%20Status%20Queries%20and%20Calls

You can find all of the API calls on the documentation tab. All APIs require OAuth too. I'm not familiar with SharePoint, so maybe someone else can help you with that.

@JoeMayo
Jul 10, 2013 at 1:56 PM
Hi

I am having a very similar problem, I want a very simple timeline pulling through a few tweets. This would of been easy under the old API but seems very difficult now!!

I have seen the page that you have linked from but I am getting a little confused around the authentication side of things, forgive me if im being completely thick but with OAuth typically a user would be redirected to the Twitter web site, allow their account to be used with twitter and then sent back to my site. However this is a completely pointless step with what I am trying to do as the user is not interacting with Twitter directly, they are not pushing to it, or even pulling any of their own data, just pulling my clients twitter page, they shouldnt even need their own twitter account. Do I still need this level of authorization? Also from the example on the page you have linked, you have a return to force the redirect to twitter. However really I just want to create a class with a constructor to automatically authorizes and creates the context and then a method that I can call to get me the tweets, but in this way as I am using a constructor to authorize, there is no return type.

Do you have any suggestions on the best way to tackle this? Basically I want to re-create the embeddable timelines available directly from twitter (https://dev.twitter.com/docs/embedded-timelines) but have control over the markup.

Many Thanks
Dave
Coordinator
Jul 10, 2013 at 7:43 PM
Hi Dave,

As I've documented at Securing Your Applications, the primary purpose of OAuth is to protect the user. My opinion is that Twitter is going in the correct direction on being more secure and protecting users, although the result is more work for developers. That said, I agree that it's pointless to cause the user to perform unnecessary work, and there is something you can do about it.

There are a couple Authorizers you can use that help avoid the OAuth dance for the user: SingleUserAuthorizer and ApplicationOnlyAuthorizer. I haven't documented ApplicationOnlyAuthorizer yet, but you can find an example in the Program.cs file of the LinqToTwitterDemo project in the downloadable source code.

@JoeMayo