EllisLab text mark
Advanced Search
6 of 12
6
   
Poll
Should I make the repository Spark friendly?
Yes 6
No 2
Branch off and create a "full" branch. 3
Total Votes: 11
You must be a logged-in member to vote
Facebook Ignited
Posted: 09 July 2012 12:41 PM   [ # 81 ]   [ Rating: 0 ]
Avatar
Joined: 2009-10-10
20 posts
deth4uall - 09 July 2012 12:18 PM

Very nice, thanks for your contribution. I will definitely give you thanks in the repo. smile I am going to make the method names uniform with the rest of the library, keep any eye on the repo.

Additionally what is

document.getElementById('msg').[removed] 
supposed to be?

Oh , I didn’t see that one, its:

document.getElementById(‘msg’).i n n e r H T M L

without the spaces

 
Posted: 09 July 2012 01:06 PM   [ # 82 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-21
80 posts

Awesome, I included it and pushed it up. I am going to wait a bit longer before making it a release.

 Signature 

Dark Prospect Games, LLC | Facebook Ignited on GitHub

 
Posted: 25 July 2012 09:46 PM   [ # 83 ]   [ Rating: 0 ]
Joined: 2012-07-25
1 posts

Is there also a function for getLogOutUrl() like the login one?
If no, Do you have any idea how to get a logout url.

Thanks in advance

 
Posted: 26 July 2012 12:20 PM   [ # 84 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-21
80 posts

I believe it should be the same as the getLoginUrl() function?

 Signature 

Dark Prospect Games, LLC | Facebook Ignited on GitHub

 
Posted: 08 August 2012 04:30 AM   [ # 85 ]   [ Rating: 0 ]
Avatar
Joined: 2009-10-10
20 posts

I wrote a wrapper function for fql because I had performance issues when running multiple graphapi calls, I read that fql is the way to go when you need lots of data from different facebook users.


this is the function in Fb_ignited.php:

public function fb_fql($fqlquery$multi=false)
 
{
  
/**
   * This function is a wrapper for fql
   */
  
if($multi==true){
   $fqlmultiquery 
'';
   foreach(
$fqlquery as $querykey => $query){
    $query 
str_replace(' ''+'$query);
    
$fqlmultiquery $fqlmultiquery '"' $querykey '":"' $query '",';
   
}
   $fql_multiquery_url 
'https://graph.facebook.com/'
       
'fql?q={' $fqlmultiquery '}'
       
'&' $this->CI->facebook->getAccessToken();
   
$fql_multiquery_result file_get_contents($fql_multiquery_url);
   
$fql_obj json_decode($fql_multiquery_resulttrue);
  
}
  else{
   $fqlquery 
str_replace(' ''+'$fqlquery);
   
$fql_query_url 'https://graph.facebook.com/'
       
'fql?q=' $fqlquery
       
'&' $this->CI->facebook->getAccessToken();
   
$fql_query_result file_get_contents($fql_query_url);
   
$fql_obj json_decode($fql_query_resulttrue);
  
}
  
//return results of fql multiquery
  
return $fql_obj;
 

 

This is sample code for a controller:

// multi fql
   
$myfqlqueries = array(
    
'query1' => 'SELECT name FROM user WHERE uid = 4',
    
'query2' => 'SELECT name FROM user WHERE uid = 4'
   
);
   
$fqlmultitest $this->fb_ignited->fb_fql($myfqlqueriestrue);
   
print_r($fqlmultitest);
   
   
// single fgl
   
$fqltest $this->fb_ignited->fb_fql('SELECT name FROM user WHERE uid = 4');
   
print_r($fqltest); 

 

Explanation:

if you want to run a single query use: $this->fb_ignited->fb_fql($my_query)

if you want to run multiple queries use: $this->fb_ignited->fb_fql($my_query_array, true)


NOTE: allow_url_fopen must be true in the server configuration for fql to work.

 

 
Posted: 08 August 2012 08:52 AM   [ # 86 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-21
80 posts

Looks good man, I also added it to the next patch. v1.1.0.  Thanks again for the contributions. smile

 Signature 

Dark Prospect Games, LLC | Facebook Ignited on GitHub

 
Posted: 08 August 2012 11:03 AM   [ # 87 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-21
80 posts

Release v1.1.0

- Added fb_post_to_feed_dialog(), fb_send_dialog() and fb_request_dialog() courtesy of Kimmik from CI Forums.
- Resolved issues #4 & #6 regarding the demo login link being wrong. The variable was not not encased in <?= ?>

Thanks Kimmik for your contributions to the project!

 Signature 

Dark Prospect Games, LLC | Facebook Ignited on GitHub

 
Posted: 09 August 2012 05:34 AM   [ # 88 ]   [ Rating: 0 ]
Joined: 2011-03-30
2 posts

You can update your readme page :
Once you have the system loaded for first time, please go and read:

https://bitbucket.org/deth4uall/facebook-ignited/wiki/Home and https://bitbucket.org/deth4uall/facebook-ignited/wiki/API

links are not working…

 
Posted: 09 August 2012 10:05 AM   [ # 89 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-21
80 posts

https://github.com/deth4uall/Facebook-Ignited/wiki/Methods is the API documentation. I have updated the README since you pointed that out for me. Thank you!

 Signature 

Dark Prospect Games, LLC | Facebook Ignited on GitHub

 
Posted: 16 August 2012 08:07 AM   [ # 90 ]   [ Rating: 0 ]
Avatar
Joined: 2009-10-10
20 posts

hi deth4uall,

sometimes I get an error:

A PHP Error was encountered

Severity
Notice

Message
Undefined variableme

Filename
libraries/Fb_ignited.php

Line Number
204 

Seems like when

try {
    $me 
$this->CI->facebook->api('/me');
   

fails and $redirect is false it still tries to return $me in line 204

 
Posted: 16 August 2012 04:51 PM   [ # 91 ]   [ Rating: 0 ]
Joined: 2012-05-02
29 posts

Are the links from welcome suppose to work? It says “Guest” and not my facebook, I’m pretty sure I have everything correct.  Damn, guys I’m also super confused is this suppose to a web app using facebook, or can it a facebook app inside of facebook. I’m using it inside of facebook but nothing works, if I use F-ingited on my domain the links work.

In addition getting this error ( I should just give up ); When trying to click advanced features

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

 
Posted: 16 August 2012 05:07 PM   [ # 92 ]   [ Rating: 0 ]
Avatar
Joined: 2009-10-10
20 posts
sweetD - 16 August 2012 04:51 PM

Are the links from welcome suppose to work? It says “Guest” and not my facebook, I’m pretty sure I have everything correct.  Damn, guys I’m also super confused is this suppose to a web app using facebook, or can it a facebook app inside of facebook. I’m using it inside of facebook but nothing works, if I use F-ingited on my domain the links work.

If you are not sure on how to use fb ignited, go here first and read what the facebook sdk does. FB ignited is basically a codeigniter library that makes the facebook php-sdk available in codeigniter and integrates it nicely.

 

 

 
Posted: 16 August 2012 05:14 PM   [ # 93 ]   [ Rating: 0 ]
Avatar
Joined: 2009-10-10
20 posts
sweetD - 16 August 2012 04:51 PM

In addition getting this error ( I should just give up ); When trying to click advanced features

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

Looks like the urls youre using a wrong, they should look like:

Apps on Facebook

Canvas-URL: http://mydomain.com/mycodeigniter/

secure Canvas-URL: https://mydomain.com/mycodeigniter/

 
Posted: 16 August 2012 05:19 PM   [ # 94 ]   [ Rating: 0 ]
Joined: 2012-05-02
29 posts

There are three URL’s right?

http://apps.facebook.com/appName
http://appDomain.com
https://appDomain.com

I’ve used all three and get same error.

 
Posted: 16 August 2012 05:22 PM   [ # 95 ]   [ Rating: 0 ]
Avatar
Joined: 2009-10-10
20 posts
sweetD - 16 August 2012 05:19 PM

There are three URL’s right?

http://apps.facebook.com/appName
http://appDomain.com
https://appDomain.com

I’ve used all three and get same error.

hmm, they look alright, are you sure that SSL is enabled for your webspace? Does https://appDomain.com work when you open it with your browser?

 
6 of 12
6