designanddev Posted January 5, 2013 Share Posted January 5, 2013 Can please someone help me by telling me what is wrong with this string i have wrote, were is the error what do i need to do to correct it. Kind Regards $json_content = file_get_contents('https://graph.facebook.com/'.$facebook_page_id.'/feed?access_token='.$access_token); Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 5, 2013 Share Posted January 5, 2013 There is no way for us to tell you since we have no idea what those variables contain. Also. I assume you are getting an error, so what is it? In many cases an error is reported on a particular line, but the actual error is on a previous line. It's just not till the line in question that the PHP parser gets stuck. Quote Link to comment Share on other sites More sharing options...
designanddev Posted January 5, 2013 Author Share Posted January 5, 2013 There is no way for us to tell you since we have no idea what those variables contain. Also. I assume you are getting an error, so what is it? In many cases an error is reported on a particular line, but the actual error is on a previous line. It's just not till the line in question that the PHP parser gets stuck. this variables contain numbers when i hard code them into the string they work fine Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 5, 2013 Share Posted January 5, 2013 this variables contain numbers when i hard code them into the string they work fine You think they contains numbers. If the variables would contain the values that would create a string that is the same as one you've hard-coded that works - then it would work with the variables. Also, don't try to do too many things in a single line as it makes debugging more difficult. Try the following $url = 'https://graph.facebook.com/' . $facebook_page_id . '/feed?access_token=' . $access_token; echo "URL: $url"; //Debug line $json_content = file_get_contents($url); Quote Link to comment Share on other sites More sharing options...
Barand Posted January 5, 2013 Share Posted January 5, 2013 As I see it you now have at least 3 threads open on the subject of facebook feeds. DON'T WASTE OUR TIME! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.