0

I am using Hammock to get data from the Facebook graph API. When user logs into my web site I want to get all data from his Facebook profile since he last logged my web site. So when the user logs into my web site I update his login time and from his last login date to now, I take all his Facebook profile data. I am using Hammock to do this.

I want to give Hammock a creation date parameter but it doesn't work.

This works:

 RestClient client = new RestClient { Authority = "https://graph.facebook.com/" };
 RestRequest request = new RestRequest { Path = "/me/status  " };

But this does not:

string query = "SELECT status_id, message FROM status  WHERE status_id = me() and creationTime.......";
 RestClient client = new RestClient { Authority = "https://graph.facebook.com/" };
 RestRequest request = new RestRequest { Path = "/me?q=query" };

How can I give the creation time to the hammock request?

This code works for me:

RestClient client = new RestClient { Authority = "https://graph.facebook.com/" };
RestRequest request = new RestRequest { Path = "/me/statues" };

But it loads all user statuses. I want to give a datetime parameter; for example, if I want to get user statuses since 30.08.2012.

Thom Smith
  • 13,916
  • 6
  • 45
  • 91

1 Answers1

0

In your last example, you can add the since query string to your request:

... { Path = "/me/statuses?since=2012-08-30" };

For your second example, you're using the wrong URL to make a FQL query. Try this instead:

... { Path = "/fql?q=" + Server.UrlEncode(query) };
cpilko
  • 11,792
  • 2
  • 31
  • 45