• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integrate Facebook Php Client

#21
[eluser]thunder uk[/eluser]
Yes, it's the path info bit that's foxing you.

http://www.mycampuslinks.com/index.php/fbook/?foo=bar

works fine (as far as I can see - I didn't go further than the facebook add app request)

So if you change your config.php file as above, you should be ok

#22
[eluser]codelearn[/eluser]
thunder uk,

Thanks so much, that was definitely a step in the right direction. I can now add the app etc but when I get back to the http://www.mycampuslinks.com/fbook I am seeing

Welcome!Array ( )

The post array is blank! Could this be something in my appinclude file?

My appinclude file is:

Code:
<?php


require_once 'client/facebook.php';
parse_str($_SERVER['QUERY_STRING'],$_GET);

$appapikey = '0b9368b1ba1c08b34b706fbde5061e96';
$appsecret = '90db8a672c6202e4d89d4407f0532746';
$facebook = new Facebook($appapikey, $appsecret);
$user = $facebook->require_login();
$fb_user = $facebook->user;
$about = $facebook->api_client->notifications_get();

//[todo: change the following url to your callback url]
$appcallbackurl = 'http://www.mycampuslinks.com/';  

//catch the exception that gets thrown if the cookie has an invalid session_key in it
try {
  if (!$facebook->api_client->users_isAppAdded()) {
    $facebook->redirect($facebook->get_add_url());
  }
} catch (Exception $ex) {
  //this will clear cookies for your application and redirect them to a login prompt
  $facebook->set_user(null, null);
  $facebook->redirect($appcallbackurl);
}

?>

Again, thanks so much for the help.

#23
[eluser]Iverson[/eluser]
[quote author="mohrt" date="1186688598"]I get a 404 not found.[/quote]

He left out a slash in "http://"....lol

#24
[eluser]benoa[/eluser]
@codelearn: never post your $appsecret! It's supposed to be secret you know! I highly recommand you to change it.

#25
[eluser]Dam1an[/eluser]
Wow this is an old thread!
And Benoa, how do you know thats the real key not a fake one? Tongue

#26
[eluser]benoa[/eluser]
You're right mate, that could have been a fake one, though I wanted to point that out. Many people don't think about this potential threat and post their app keys and secret on forums. That can harm.

I've been doing some research about Facebook development and CI and came up here... I'll develop Facebook apps with CodeIgniter, too, as it is on of my monthly income Wink

#27
[eluser]RJ[/eluser]
You link to signup on Motortopia in facebook is broken.

#28
[eluser]Paul Bringetto[/eluser]
This library is a wrapper for the facebook PHP client intended to be used with Code Igniter for fbconnect enabled websites that also have multiple facebook applications growing out of them. The following code is the bare minimum needed to build multiple facebook apps on CIs back. It still needs error handling and boring stuff like that..

http://paul.bringetto.com/2009/06/01/cod...n-library/

#29
[eluser]RJ[/eluser]
Thanks for the link @Paul Bringetto, good information definitely book mark for later. One question, you are loading a plugin in your library, where is that coming from?

#30
[eluser]Paul Bringetto[/eluser]
Yeah. it's being called from the library. I dunno if it's the greatest method yet but i needed something quick to start building apps for slingshotlabs new dating property. I'm sure it will evolve w/ the project; I'll try to keep posting source as it's updated.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.