Twitter API Get Only User Tweet - php

I am using Twitter's API to retrieve user tweets (via screen name). However this is returning all "retweets" and random replies to other twitter users. I've been searching through Twitter's API to find a way to ONLY pull back the tweets instead of both tweet & reply but can not find a good solution. Could anyone lend a hand?
Thank you.

Have a look at this doc. Simply add parameters
exclude_replies=true & include_rts=false
along with your query. This will filter the retweets and replies!

Related

Scan any twitter account

One of my friend give me this challenge.
Monitor/Scan any twitter account for specified keywords inputted into the
program and grab the twitter Link Instantly and proceed to add to cart.
Must be using the Twitter API with oauth! Must find the tweet instantly or
BEFORE it is even tweeted out by the twitter account!
Please guide me
Thanks
You can get information based on tweets with the twitter GET search/tweets API.
There is no way anyone can guide you through all of this from here. But we can shoot you in the right directions and help you through the parts you get stuck at!
Here is a link to the GET search/tweets API
Click Here
Get the API and build a working environment on your local machine. From there if you run in to problems ask and you shall receive answers!
Hope this helps!

Twitter API get streaming data

I am exploring the Twitter streaming API and have gone through various documents and examples, but I don't know where to start.
I could not find a beginners tutorial.
Most of the examples use a username and password - are these the Twitter account username and password?
I appreciate if someone can list down the steps to follow.
I am working in PHP.
Twitter have deprecated API v1.0 which was using only username of any person to get tweets.
So you have to use API v1.1. Please go through following links, you will get much information about creating API.
Simple Tweets
Advance with layout
No. You can not get all tweets. This is called the firehose and costs several million dollars a year. Twitter only sells that to a few partners.

are there APIs to get some statistics from twitter

I have a task to create a dynamic page (PHP or Javascript) that shows:
Number of tweets with specific hash tag
Number of tweets that came from specific country!!
most popular hash-tags for specific country
does anybody have any idea of how to get such stats or part of them??
Thanks a lot for your help
Yes, but you should really search more because there's a lot of information out there on this - start at the Twitter API Docs.
You use it as a search term
Try https://dev.twitter.com/docs/places/finding-tweets-about-places
Combine 1. & 2.
No. Twitter releases its statistics after a certain period of time. There's no definitive/official API for that. But there are a lot of third-party applications that offer that.
InsideTwitter
Twitter by Country
Twitter Counter

Search Facebook events by location

I am planning to use FB API to access "Events". For an example if I select Sri Lanka. All events by that location. If you guys had any luck with that let me know. I am browsing trough FQL to get this done didn't have much luck.
This does look like something helpful , i found it from a search , but couldn't. Get it to work as I need.
https://graph.facebook.com/search?q=coffee&type=post&geo=id&lang=indonesia&location=indonesia
Please post me up if you guys have any idea.
PS : Final outcome it to grab Events from FB and post on a blog something similar to tumblr.
I haven't done much work on Facebook platform but the following information might help you:
Read the Developer Documentation as it will tell you how to use API methods and what are their limitations
From what I understand, you can use https://graph.facebook.com/me/events?access_token=[a valid access token] to get events that the current user has been invited to or hosting. It is important to understand that this information are per user basis and each user will have to authorize your application to use information about their subscribed events. This means that it may not be possible to do something like 'Get a list of all events taking place in Colombo, Sri Lanka'. However you could use the above mentioned api method to collect data from users who use your application. You can then use this data retrospectively create a graph showing all public events information.
Hope that helps.
Dinesh.
Facebook doesn't support searching for events by location from the API. However you can use the graph search like this: https://graph.facebook.com/search?q=srilanka&type=event this will search for events having "srilanka" in either the description or the name or as their location. This does not guarantee that the events are from sri lanka but you can filter out the results based on the "location" field returned by the api.

Combining multiple Twitter user timelines into one request

I am relatively new to the twitter API so the question might seem foolish but please help me out.
I am trying to get tweets from user's timeline using their API, which I know is possible.
Now the issue is I have to get tweets from multiple users (combining upto 30-40 users) timelines into one API request. How can I do this?
Would the streaming API help? I couldn't make heads or tail of it.
You can add those users to a list and pull the timeline for the list.

Categories