Calling unauthenticated OEmbed endpoint

Nov 19, 2013 at 4:17 PM
I'm working on an application which requires calling OEmbed for a large number of tweets. In the twitter documentation says that you should use the unauthenticated OEmbed endpoint in order to avoid hitting the rate limit, as this endpoint is not limited.

Is this possible using LinqToTwitter ? Or is it only possible to call the v1.1 endpoint using LinqToTwitter, and thus be subject to the rate limits?

The call I'm making to fetch the embed codes currently looks like this:
 using (var ctx = new TwitterContext(_authorization))
            {               
                var tweet = ctx.Status.Where(m =>
                    m.ID == tweetId &&
                    m.OEmbedHideMedia == true &&
                    m.OEmbedOmitScript == true &&
                    m.OEmbedMaxWidth == 315 &&
                    m.Type == StatusType.Oembed)
                    .First();

                return tweet == null ? "" : tweet.EmbeddedStatus.Html;
            }
thanks in advance.
Coordinator
Nov 19, 2013 at 4:29 PM
HI,

The OP in that post was reading old v1.0 documentation. Earlier this year, Twitter deprecated v1.0 and everyone must now use v1.1, which LINQ to Twitter supports. In v1.1, all endpoints are rate limited. Here's the proper Twitter API documentation:

https://dev.twitter.com/docs/api/1.1/get/statuses/oembed

And the corresponding LINQ to Twitter documentation:

https://linqtotwitter.codeplex.com/wikipage?title=Getting%20Status%20oEmbed%20Information&referringTitle=Making%20Status%20Queries%20and%20Calls

@JoeMayo
Nov 19, 2013 at 4:44 PM
Thanks very much for your response.

According to Twitter, when they deprecated v1.0 they continued to support unauthenticated calls to v1.0 Oembed enpoint as explained here

(also explains why their developer was still recommending using that endpoint in the discussion I linked to in my first post)

Is there any way I can call this endpoint with LinqToTwitter? I'm already using LinqToTwitter, so would rather continue to do so, rather than have to do it manually.