EOFError: end of file reached issue with Net::HTTP

If the URL is using https instead of http, you need to add the following line: parsed_url = URI.parse(url) http = Net::HTTP.new(parsed_url.host, parsed_url.port) http.use_ssl = true Note the additional http.use_ssl = true. And the more appropriate code which would handle both http and https will be similar to the following one. url = URI.parse(domain) req … Read more

Getting the Facebook like/share count for a given URL

UPDATE: This solution is no longer valid. FQLs are deprecated since August 7th, 2016. https://api.facebook.com/method/fql.query?query=select%20%20like_count%20from%20link_stat%20where%20url=%22http://www.techlila.com%22 Also http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.techlila.com will show you all the data like ‘Share Count’, ‘Like Count’ and ‘Comment Count’ and total of all these. Change the URL (i.e. http://www.techlila.com) as per your need. This is the correct URL, I’m getting right results. EDIT … Read more

Current Month Facebook Friends Birthdays in Android

What you can do is calculate the following values using language you are using and use them in your FQL: 1st’s day of the current month (17), Today’s month of the year (01) End date day of the current month (31) Make sure days and months are formatted using dd and MM respectively (padded with … Read more

What’s the Facebook’s Graph API call limit?

The best answer to this question from another forum, from Ash Rust in 2010: “After some testing and discussion with the Facebook platform team, there is no official limit I’m aware of or can find in the documentation. However, I’ve found 600 calls per 600 seconds, per token & per IP to be about where … Read more

tech