spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories

See if a user is following me from tweet JSON?


Twitter REST API has a method to show user relationship data. See the documentation on https://dev.twitter.com/rest/reference/get/friendships/show. It says:

Returns detailed information about the relationship between two arbitrary users.

The response contains following and followed_by fields in source and target user. This is the result sample:

{
"relationship": {
  "target": {
    "id_str": "12148",
    "id": 12148,
    "screen_name": "ernie",
    "following": false,
    "followed_by": false
  },
  "source": {
    "can_dm": false,
    "blocking": null,
    "muting": null,
    "id_str": "8649302",
    "all_replies": null,
    "want_retweets": null,
    "id": 8649302,
    "marked_spam": null,
    "screen_name": "bert",
    "following": false,
    "followed_by": false,
    "notifications_enabled": null
  }
}
}

I don't know if this can help you when using streaming API. But at least, you don't have to "do a request for my followers list and compare against that for every new tweet" like you've said above.


Categories : Javascript

Related to : See if a user is following me from tweet JSON?
tweet favorite count
Retweets: https://dev.twitter.com/rest/reference/get/statuses/retweets/%3Aid Shares: Aren´t "Retweets" actually shares? Favorites: I am not sure if it´s possible, there is no endpoint afaik You can also use a platform like sharedcount though, a lot easier to handle and you get all the counts in one call - for all relevant platforms. That would be the best solution if you only want to get coun

Categories : Twitter
is it possible to create a twitter icon below tweet
Those tweets you see with interactive elements are using Twitter Cards. They're fairly simple to set up - but will require you to add some metadata to your website.

Categories : Twitter
Recently Add
Disable Satellizer Popup Window Title Bar
Can't load css, js and image with htaccess
Angular Directive to modify embed
IE9 HTML5 video "play" event not fired on second play
AngularJS filter by select with empty options
Correct way to create custom errors in javascript
HTML elements only show after i reload page?
javascript variable returning null
How to use class names?
Custom scroll function - flickering effect
How to compare time with AM PM in JavaScript
Ionic / How to expect a cached view to be refreshed?
How can I pass the current element to a Javascript function in a Knockout.js binding?
Using custom C++ code for a HTML5 project
bootstrap accordion dropdown behind footer
JQuery show /hide div from drop down list change
Move background-position x px to left/right according to mouse movements (starting from background-position:center)
Create and Insert an Input on "Enter"
Cordova Local Notification playing local sound for iOS and Android
Exclude route from express middleware
Loop over random JSON entries using jQuery
Applying form validation of select menu similar to html5 required attribute of
Syntax error, unrecognized expression: [object HTMLDivElement]input:checkbox[name=]:checked
Page keeps loading even after response is fetched
Is There a way to use Document.getTime() From a Certain Time?
How to change x axis format from d3.js line charts
Google Chart: is it possible to use Strings for the x axis?
'angular' is not defined (scripts not linking together)
extract the value of an array in an existing javascript file
Allow only alphanumeric, dash, underscore, and period in string (Javascript)
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.