How to get the "user_mentions" of my username with REST API 1.1


#1

Can any one provide a sample request url
and how to bind the oAuth variables with the request?

Thanks in advance


#2

To build the OAuth variables, you’ll be best off using a library. See [node:126] for some helpful ones. One of the variables is a request signature that is itself derived from other variables.

The method for retrieving the “current user”'s mentions is [node:9526]. It’s only viewable by the user that “owns” it.

Here’s an example of making such a request:

GET https://api.twitter.com/1.1/statuses/mentions_timeline.json?count=5

OAuth Signature base string:

GET&https%3A%2F%2Fapi.twitter.com%2F1.1%2Fstatuses%2Fmentions_timeline.json&count%3D5%26oauth_consumer_key%3D5aA6oofBOFAwN4tfmEYWjg%26oauth_nonce%3D5TYr7dykXhS9oWOIWrOnpFvpbWaRE7sMj3kBDWEQ%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1377616521%26oauth_token%3D119476949-oYGCs2M5duG5QalbOAK2YUZh8zG3ur7DPYo5qIFN%26oauth_version%3D1.0

Signature:
H9I5mKo1hVkEYeUyk2xlhR5Tf6A=

Authorization header:

OAuth oauth_nonce=“5TYr7dykXhS9oWOIWrOnpFvpbWaRE7sMj3kBDWEQ”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1377616521”, oauth_consumer_key=“5aA6oofBOFAwN4tfmEYWjg”, oauth_token=“119476949-oYGCs2M5duG5QalbOAK2YUZh8zG3ur7DPYo5qIFN”, oauth_signature=“H9I5mKo1hVkEYeUyk2xlhR5Tf6A%3D”, oauth_version=“1.0”


#3