Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error making any API Calls #4

Closed
JackWH opened this issue Feb 19, 2011 · 2 comments
Closed

Error making any API Calls #4

JackWH opened this issue Feb 19, 2011 · 2 comments

Comments

@JackWH
Copy link

JackWH commented Feb 19, 2011

Hi Elliot, great Facebook library - it was a breeze to set up and your code looks really solid!

So far I've gotten the user to login and authorise just fine - that part works great. The problem comes when I try to make any API calls.

I've added the following function to facebook_test.php controller:

function test()
{       
    $status = $this->facebook->call('post', 'me/feed', array('message' => 'Hello, World!'));
}

Perfectly valid, I think you'll agree - yes? But this is the error returned by mysite.com/facebook_test/test

exception 'facebookException' with message '0 | Request Failed' in /Users/Jack/Sites/MySite.com/application/libraries/facebook.php:234 Stack trace: #0
/Users/Jack/Sites/MySite.com/application/libraries/facebook.php(194): facebookConnection->_getResponse('Resource id #14') #1
/Users/Jack/Sites/MySite.com/application/libraries/facebook.php(174): facebookConnection->_addCurl('https://graph.f', Array) #2
/Users/Jack/Sites/MySite.com/application/libraries/facebook.php(66): facebookConnection->post('https://graph.f', Array) #3
/Users/Jack/Sites/MySite.com/application/controllers/facebook_test.php(73): facebook->call('post', 'me/feed', Array) #4 [internal function]: Facebook_test->test() #5
/Users/Jack/Sites/MySite.com/furnace/core/CodeIgniter.php(297): call_user_func_array(Array, Array) #6
/Users/Jack/Sites/MySite.com/index.php(163): require_once('/Users/Jack/Sit...') #7 {main}

Is this an issue with the library and my PHP configuration or something? Any API calls reproduce this (get, post, etc.). The returned error isn't very helpful either.

To confirm, I have this in my configuration file:

$config['facebook_default_scope']   = 'publish_stream,email'; 
@JackWH
Copy link
Author

JackWH commented Feb 19, 2011

Something seems to be wrong with GitHub's Markdown - where it says:

getResponse('Resource id <a href="/elliothaughin/codeigniter-facebook/issues/14" class="internal">#14</a>')

That should not be surrounded by an Anchor tag. It should just say:

getResponse('Resource id # 14')
(without a space before 14). Hmmm!

@JackWH
Copy link
Author

JackWH commented Feb 23, 2011

Update: This problem is now fixed with a solution in #5

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant