Vishnu Chid
Vishnu Chid

Reputation: 1523

Facebook app on Google app engine (php Graph api)

I have installed Quarcus using java in google app engine and php is working fine.

Now i am really interested to use facebook in app engine.But i am struck in middle.

I got the access token successfully, I used below code to get an user ID

$url =  "https://graph.facebook.com/me?access_token=".$access_token;
 $response = file_get_contents($url);
    echo $url;

but i am getting below error

Warning: /me cannot be read [file_get_contents] https://graph.facebook.com/me?access_token=sdfsdfsft0GhbgkL54nwRjlF8oZCkdgFhb0b2M45JfVIZBX9PMZCvgkTPmjDawHSFt7KiZA67PVRws2OG3x6R5tKksdfsdfsf

But when i access the above url in browser its working fine.Any help please.

p.s : heard that curl dont work on google app engine..is it true?

Upvotes: 0

Views: 338

Answers (1)

Rekby
Rekby

Reputation: 688

Application haven't direct access to internet, you must use urlfetch.

You must find way to run java functions from php and use it.

For Java you can see documentation here: https://developers.google.com/appengine/docs/java/urlfetch/overview

Low-level: https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/package-summary

Upvotes: 1

Related Questions