Twitter Streaming API - filtering by urls - twitter

I am trying to filter tweets from the Streaming API using a url in the track parameter. However I'm not getting the tweets I expect. My suspicion is that the filter doesn't apply to the expanded url and but to the automatically shortened url (t.co).
Can anyone confirm that this is the case? The Streaming Api docs don't even mention how the filtering is applied.
If this is the case does anyone have a workaround?

I'm using the extended URL with cURL. I get the live tweets on my terminal for a particular search parameter. You may like to look into this one.
curl https://stream.twitter.com/1/statuses/filter.json?track=SEARCH_PARAMETER -uUSERNAME:PASSWORD

Related

How to programmatically check if a live YouTube channel is streaming?

My company runs a live web stream and has started duplicating this to YouTube. Unfortunately the staff won't check if it's live and internet issues cause our web encoder to stop encoding at times.
Is there a programmatic way I can tell if a channel is ACTUALLY streaming? i.e. if live video is coming out the channel and not just that "the channel is live"?
You may use Search: list.
Using this request returns a collection of search results that match the query parameters that you have specified in the API request. Add part=snippet in your request since this is a required parameter. Then, you may add the following optional parameters with their corresponding values in your HTTP request:
channelId=[channelId] - to search resources created by a particular channel.
type=video - to retrieve a particular type of resource
eventType=live - to return only active broadcasts. Please note that if you use eventType, also set the type parameter's value to video.
Combining all of these parameters, you may send HTTP request using the following format:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCXswCcAMb5bvEUIDEzXFGYg&type=video&eventType=live
To better filter your search, you may also opt to add more parameters that are listed in supported parameters.
Lastly, solution in this related SO post - How to check if YouTube channel is streaming live might also help.

get tweets using stream API twitter using 1.1

I found that we can use stream API to get the latest tweets based on hash tags or keywords.
It says you have to keep your http connection open. I am having a doubt regarding this.
Can anyone give me an example of stream API in php?
And other thing can I skip hashtag and keyword parameter is this API ? So I can all the statuses?
Can I pass a parameter like latitude and longitude to get tweets from the specific region?
You can request tweets by location, see their API documentation for specifying location boundaries:
https://dev.twitter.com/docs/streaming-apis/parameters#locations

How to get results with twitter search api?

I wish to get tweets with a keyword. But There is no result with any keyword.
http://search.twitter.com/search.json?q=summer
How to get results with Twitter Search API?
Version 1 of the twitter API has been deprecated and is being removed. Not sure how you can miss the giant warnings on the twitter dev site ;) This means simple code like the above will not work any more.
So, you now need to make authenticated requests (OAuth) using the 1.1 API, and it's nowhere near as simple as just doing a (in PHP) file_get_contents(http://search.twitter.com/ ...).
I couldn't see any server-side languages you use from your profile, but I wrote a lengthy post explaining the issue (with pictures) and how to use a php library to perform authenticated requests.

Using non Google Analytics tag in URL alongside regular Google Analytics tags

I'm having some issues with Google Analytics URL parameters. Prviously I've built URLs with the Google Analytics URL Builder. these have enabled me to track where visitors to my site have been coming from, how successful various marketing campaigns have been etc.
Recently, I've started using another tag in the URL, one which has nothing to do with Google Analytics, but acts to alter the telephone number on my site when the visitor arrives on it. For example, I'll add &ctcc=adwords onto the end of my tracking URL, and a specified phone number will appear on my site when the user comes through so I can track how many calls my adwords spend has generated.
However, when I've been using this ctcc code, Google Analytics no longer seems to be tracking the traffic numbers to my site :(
Any idea how I can incorporate the two parameters into the URl, and ensure that they both work as expected?
Thanks in advance
It looks like this is a problem with how your server is redirecting traffic with a ctcc query parameter. Look at the following request and its response headers:
So the ctcc parameter is used in some server side tracking (as best as I can tell), and the server is set up to redirect & strip ctcc whenever it gets a request with ctcc. Not being familiar with the system in use, I can't provide details, but you need to reconfigure the redirects to stop changing & into ;. It's the replacement of ampersands with semicolons that is messing up your GA data.

Twitter tweets about a certain url via salmon and/or pubsubhubbub?

For a web-application I am writing (Rails) I am looking for ways to post back publick mentions about that post. Mentions on Twitter, Facebook, Reddit and so on.
Starting with Twitter, I am looking for a way to get these tweets back into the application. Obviously I could simply monitor the twitter firehose (through their search, most probably) for a certain url (the url of the post), if found, extract that and place that tweet as new comment to the post. But this requires me to invent something similar for each and every social network.
Whereas there is a generic protocol for this: Salmon, allowing services to push such comments (tweets mentioning your url) through PubSubHubbub (PSH).
I did not find any mention of this on the Twitter API itself; they are not using PSH or Salmon (yet) it seems.
But maybe there are thirdpartis that do? Know any? Are there other projects that wrap around Twitters firehose and allow you to approach Twitter as if it is a Salmon-speaking pubsubhubbub? And What about Reddit, or Facebook?
The Twitter API TOS explicitly forbids the re-distribution of tweets via APIs*, except for Twitter's partners. These are DataSift and Gnip - but they don't do what you are looking for.
Your best option would be to simply monitor the filterhose.
* Actually, it's allowed to share IDs, but those are pretty useless since you have to look them up manually.

Resources