0

I'm trying to build an application to let users vote pictures in my site. Users can vote by clicking the "I like" button. I have to register votes for each picture and store that values in a database. I need this information in order to show those pictures in my web site ordered by votes descending (and I'll pick up the votes from the db).

I don't know how to export those data to the db. The application will be written in ASP classic.

I've read here Facebook Like button and MySQL database to perform FQL

SELECT like_count FROM link_stat WHERE url="url is here"

There was also the suggestion to read here: http://developers.facebook.com/docs/reference/fql/link_stat

It says to run this query

$facebook->api_client->fql_query('SELECT share_count, like_count, comment_count, total_count FROM link_stat WHERE url="YOUR_SHARE_URL"');

My problem is that I work in ASP Classic and I don't know how to run that query.

Community
  • 1
  • 1

1 Answers1

0

Check this out, it seems like you can simply escape you query statement and add it to the url.

http://developers.facebook.com/docs/reference/fql/links/

eg.

https://api.facebook.com/method/fql.query?query=SELECT+share_count%2C+like_count%2C+comment_count%2C+total_count+FROM+link_stat+WHERE+url%3D%22google.com%22&access_token=2227470867|2.AQCjzTJiS0GEC4Mm.3600.1314694800.0-100001742787554|HvVVWfurhpbzG-j5cS5LHGlkFew

OpenGG
  • 4,345
  • 2
  • 24
  • 31
  • 1
    You should also paste the query separately: `SELECT share_count, like_count, comment_count, total_count FROM link_stat WHERE url="google.com"`. You could also show a method of building (concatenating) the URL, using [`urlencode()`](http://php.net/manual/en/function.urlencode.php): `$url = 'https://api.facebook.com/method/fql.query?query='.urlencode($query).'&access_token='.$access_token;`, this would make your post much more readable (and more useful). – Sk8erPeter Oct 06 '13 at 00:41