Support for the new Twitter API Likes Lookup added to Social Opinion API
source link: https://jamiemaguire.net/index.php/2021/06/12/support-for-the-new-twitter-api-likes-lookup-added-to-social-opinion-api/?utm_campaign=support-for-the-new-twitter-api-likes-lookup-added-to-social-opinion-api
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
C#, Social Opinion API, Twitter, Twitter API v2
Support for the new Twitter API Likes Lookup added to Social Opinion API
I’ve implemented all Likes Lookup endpoints that were recently shipped by Twitter. These are available in my NuGet package and on GitHub.
You can do the following with this latest update:
- Get a list of users that like a tweet
- Get a user’s liked tweets
- Like a tweet
- Unlike a tweet
Each method simple to use and you can use them with a few lines of code. The first thing you need to do is create an instance of the new Likes Lookup service and pass in your OAuth tokens:
You are now free to call each of the methods.
Users that Like a Tweet
This method will get you a list of users that like a given tweet id.
Each item in the list will contain all publicly available properties for the user on Twitter.
You can see an example of the user data each item will contain here:
Users Liked Tweets
This method will give you of the tweets a given user id has liked:
You can see an example of some of the tweet data each item will contain here:
Like a Tweet
This method will let you programmatically like a tweet for a given user id (via OAuth) against a given tweet id:
Unlike a Tweet
This method will let you programmatically unlike a tweet for a given user id (via OAuth) against a given tweet id:
Each return a true/false based on the results of the method call.
Use Cases
There are a few things you can do with these endpoints.
Audience Insights
Use this to better understand your audience and followers. Understand what they “like”, infer Context Annotation or apply further analytics such as NER and sentiment analysis to see what they care about.
Outreach and Audience Building
Identify popular tweets using metrics such as Likes, Impressions etc. Next, list users that have liked your popular tweets.
Profiling
Dive deep into user profiles. Use the Timelines API and the Tweets Lookup to better understand what account tweets about and what they like. Package this into an analytics report. These are just a few ideas, and you probably have your own.
Free NuGet Package: You can find the free NuGet package here.
More information on the Likes Lookup API here.
If you want to quickly understand your followers, analytics or automate aspects of your Twitter account, you can do that using Social Opinion.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK