Welcome Guest, Not a member yet? Register   Sign In
Integrate Facebook Php Client
#3

[eluser]mohrt[/eluser]
Yes, I just launched my first facebook app today.

http://apps.facebook.com/motortopia/

The only snafu I ran into was $_GET var clobbering by CI. I had to replace them in the controller. Here is a snippet:

Code:
class F8 extends Controller {
  function F8()
  {
    parent::Controller();
    // work around CI GET clobbering
    parse_str($_SERVER['QUERY_STRING'],$_GET);
    
    if($this->uri->segment(2) !== 'remove_app')
      require_once APPPATH.'/scripts/facebook_client/appinclude.php';
  }
  function index()
  {
     // you should use view files here, etc
     echo "Welcome!";
     // see all the $_POST data the Facebook environment gives you
     print_r($_POST);
  }
}

I dumped all the facebook client data in one directory then included the appinclude.php from the constructor.

My callback URL looks like http://www.mydomain.com/f8/

Anytime you call a URL like http://apps.facebook.com/myapp/foo/bar/blah, the callback URL fetched by Facebook will be http://www.mydomain.com/f8/foo/bar/blah

My post-remove URL is http://www.mydomain.com/f8/remove_app

The post-remove URL cannot include the appinclude.php file, thus the segment check.


Messages In This Thread
Integrate Facebook Php Client - by El Forum - 06-21-2007, 11:56 PM
Integrate Facebook Php Client - by El Forum - 06-27-2007, 10:55 AM
Integrate Facebook Php Client - by El Forum - 06-28-2007, 11:18 PM
Integrate Facebook Php Client - by El Forum - 07-04-2007, 01:07 AM
Integrate Facebook Php Client - by El Forum - 07-11-2007, 03:20 PM
Integrate Facebook Php Client - by El Forum - 07-12-2007, 01:11 AM
Integrate Facebook Php Client - by El Forum - 07-25-2007, 06:34 AM
Integrate Facebook Php Client - by El Forum - 08-08-2007, 12:20 PM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 07:27 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 08:38 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 08:43 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 09:10 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 09:57 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 10:24 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 10:26 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 10:31 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 10:34 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 10:43 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 10:46 AM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 02:31 PM
Integrate Facebook Php Client - by El Forum - 08-09-2007, 02:37 PM
Integrate Facebook Php Client - by El Forum - 08-15-2007, 02:03 PM
Integrate Facebook Php Client - by El Forum - 11-17-2008, 10:43 AM
Integrate Facebook Php Client - by El Forum - 05-21-2009, 05:24 AM
Integrate Facebook Php Client - by El Forum - 05-21-2009, 05:26 AM
Integrate Facebook Php Client - by El Forum - 05-21-2009, 05:49 AM
Integrate Facebook Php Client - by El Forum - 05-21-2009, 03:52 PM
Integrate Facebook Php Client - by El Forum - 06-02-2009, 02:48 PM
Integrate Facebook Php Client - by El Forum - 06-02-2009, 03:59 PM
Integrate Facebook Php Client - by El Forum - 06-02-2009, 04:15 PM
Integrate Facebook Php Client - by El Forum - 05-03-2011, 12:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB