sammyk / facebookquerybuilder Goto Github PK
View Code? Open in Web Editor NEWA query builder for nested requests in the Facebook Graph API.
License: MIT License
A query builder for nested requests in the Facebook Graph API.
License: MIT License
TODO list for version 2.0.
This will be a big breaking change upgrade but it'll be for the better. Working with multiple apps will be easier and since SDK 4.1 is hella better, there will be more fallbacks to their native objects. :)
Think it has to be last stable and not dev-master. I've already included facebook sdk on my composer.json.
Problem 1
- sammyk/facebook-query-builder 1.0.1 requires facebook/php-sdk-v4 dev-master -> no matching package found.
- sammyk/facebook-query-builder 1.0.0 requires facebook/php-sdk-v4 dev-master -> no matching package found.
- Installation request for sammyk/facebook-query-builder 1.0.* -> satisfiable by sammyk/facebook-query-builder[1.0.0, 1.0.1].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Hello i would like to know if there is possible to run this query using Fracebook Graph API.
Can i get ALL the Facebook Pages, when the category of the facebook page, is Actor?
For example, something like this :
$c = 'actor';
$fqb->edge('pages')->fields('category', $c);
If it possibe to this?
A request to support multi-id-lookup.
Currently I have to use this work around to make multi-id-lookup requests.
$get = '/?ids={id-one},{id-two}&fields=id,name';
$object = Facebook::object($get)->get();
It would be great if you can make it this way...
$get = '/?ids={id-one},{id-two}';
$object = Facebook::object($get)->fields('id', 'name')->get();
or may be this way...
$object = Facebook::object('?ids')->ids->({id-one},{id-two})->fields('id', 'name')->get();
I was trying to use your pagination example without offset, but I get this error: Call to undefined method SammyK\FacebookQueryBuilder\GraphCollection::getGraphList() in /var/www/html/script/request.php on line 209
I actually checked in the GraphCollection Class and I couldn't find that method. Any idea how to solve this?
This is my FQB request:
$links = $fqb->object('me/links')
->fields('id','comments','likes')
->with(['offset' => $offset,
'since'=>1409529600])
->limit($limit)
->get();
Cheers
Also, I have a user logging in fine and saving all of their info (id, name, email, etc) to the DB, but it does not seem to be saving the access_token? Isn't it supposed to be? I am not sure why it isn't saving that portion in the DB...I can't tell if it is a bug, or something I need to configure?
have you been able to bring the list of friends? i try but it does not work
i did request for permission of 'user_friends'.
Hi i was checking the isLongLived function and realize that from the start return false, so it always extend the token.
i check the expires_at and it issets at 1970
I am just starting out with the Facebook API, so I am definitely just in the learning phase. I did find what seems to be a bug:
AccessToken.php > extend()
$expires_at = isset($data['expires_at']) ? $data['expires_at'] : 0;
should be
$expires_at = isset($data['expires']) ? $data['expires'] : 0;
If you look at $data that "expires" is the actual name of the key.
But even after I changed this it is still not converting the date correctly for the $token.
It is showing the expires_at date as public 'date' => string '1970-03-01 23:09:46.000000'
The graph API supports a request variable, metadata
which brings back extra information about the object.
/me?fields=id,email&metadata=1
Is there a way to retrieve this info using this library?
In my case I'm specifically looking for the type
of the object, and as far as I can tell this is the only way to do so.
Does this work with latest Graph versions (v9.0, v10.0) and latest Facebook Graph SDK (v5.7.0)?
This is some low-hanging fruit for anyone who wants to get involved! :)
Make the code PSR-2 Compliant.
Hi
How can I make request for next page of results?
I need to get all user's likes and I'm getting only 25 without setting limit and with setting limit I can get max 100 on one request.
Thanks for your help.
Hey,
The following line overrides my timezone even though it has already been set with date_default_timezone_set
https://github.com/SammyK/FacebookQueryBuilder/blob/master/src/FQB.php#L7
Mathias
A TODO list for Graph 2.1 compatibility.
i can bring the uploaded photos, is this ok?
Facebook::extend('getUserPhotosUpload', function($facebook)
{
$uploaded = $facebook->edge('uploaded')->fields('id')->limit(5);
return $facebook->object('me/photos')->fields($uploaded)->get();
});
Hello SammyK,
Firstly thanks for all this great work that you are putting into this.
Is it possible to show an example on how to obtain a page access token ?
What i was able to do is :
Now i know that i have to use that token with a GET on 'me/accounts' but i just cant find out how...
Thanks!
Is there any debug switch, to see full answer from Graph API?
$fb = App::make('facebook-query-builder');
$fb->setAccessToken('CAAIt8ie86xwBALP1tdkYTSctlj9dBc...');
$user = $fb->search('Bill', 'user')->get();
I don't know whats wrong, because all requests returns same error "Graph returned an error response."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.