How to write a complex query with doctrine?

How can I write script to query Quora , Facebook or some other social networking site?

  • To write some query which will do something like 'https://quorabot.quora.com/Quoras-Most-Followed-for-2014' . How is it possible without having database access ?

  • Answer:

    Can't say about Quora, however for Facebook and Twitter, you can query using their APIs. You should look into Facebook Graph API or Twitter Developer API. For e.g. Following piece of python code prints tweets from twitters IDs you mention : def read_tweets():         handles_list = ['the_hindu', 'ndtv'] #the no. of twitter handles needs to checked can be specified here # The base url for the Twitter API         base_url = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=%27        # Use requests' json method and #iterate through range         for user in handles_list:                 url = base_url + user                 j = requests.get(url)                 tweets = j.json()                 for x in range(0,1):                         g = tweets[x]['user']['name'] + ' Tweeted: ' + tweets[x]['text']                         print g Using APIs like this, you can perform advanced operations. You can get all the tweets of a certain person and build a graph or chart about what kind of tweets that person is posting etc.

Avinash Sajjanshetty at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.