Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get twitter URL count?

I've got the following code, and I cannot understand as to why it isn't returning and printing it in the HTML body..

var pageURL = document.URL;
var tweet  = "https://cdn.api.twitter.com/1/urls/count.json?url='"+ pageURL + "'";

$.getJSON(tweet,function(json){
    $('#twitterfeed').html(json.count); 
});

<div id="twitterfeed"></div>

https://cdn.api.twitter.com/1/urls/count.json?url=http://www.google.com

returns {"count":23844636,"url":"http://www.google.com/"}

The following doesn't seem to work, does anyone have any idea as to why?

like image 876
iBrazilian2 Avatar asked Aug 24 '15 00:08

iBrazilian2


People also ask

How do I see my Twitter counts?

To access your Tweet activity: On a desktop or laptop computer, visit analytics.twitter.com and click on Tweets. In the Twitter app for iOS or Android, tap the analytics icon visible in your Tweets. Make sure you have installed the latest version of Twitter for iPhone, iPad, or Twitter for Android.

How do I get my URL for Twitter?

Open a web browser and input Twitter.com into the address bar. Find the profile icon in the left column and click it. Your browser's address bar at the top of the screen will display your Twitter URL as twitter.com/username.

How many Twitter links are there?

You have space for only one link in your Twitter Bio! Your Twitter bio link is the single most important part of your Twitter profile. The first thing anyone notices when they land on your Twitter account is your Twitter bio.

Is Twitter 280 characters with or without spaces?

But in regards to whether or not spaces count as characters on Twitter, the answer is Yes. Spaces between words count towards the 280 character Twitter limit.


1 Answers

As of 20th November 2015 there's no Tweet count API, so don't bother: https://blog.twitter.com/2015/hard-decisions-for-a-sustainable-platform

like image 186
dain Avatar answered Oct 13 '22 11:10

dain