Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
facebook-php
- Page 1
Facebook PHP SDK v5 errors on posting into facebook page
Programming
Web Development
9 Years Ago
by Hilal2009
Hi Guys I want to post on my
facebook
page by using
Facebook
PHP
SDK v5. Here are my codes but after running, I…
Facebook PHP SDK v5 How to get a session from access_token?
Programming
Web Development
9 Years Ago
by Hilal2009
… who knows how to get a session from access_token? In
Facebook
PHP
SDK v5 I can get access_token, but I don't… get a session so as to retrieve feeds. According to
Facebook
PHP
SDK v5 and Graph API v 2.4 documentation([Click…
Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
… below are the page feeds with its comments returned by
facebook
PHP
sdk and Graph API. What I want here is to…
Re: Facebook PHP SDK v5 errors on posting into facebook page
Programming
Web Development
9 Years Ago
by Hilal2009
…(); require_once("
Facebook
/autoload.
php
"); use
Facebook
\
Facebook
; use
Facebook
\FacebookRequest; use
Facebook
\GraphNodes\GraphNode; use
Facebook
\Helpers\FacebookRedirectLoginHelper; use
Facebook
\Exceptions\FacebookSDKException; use
Facebook
\Exceptions\FacebookResponseException…
Facebook Graph API - pull user liked data
Programming
Web Development
10 Years Ago
by dominic.ceraso.9
… if($_id && $_access_token ) { require '
facebook
/
facebook
.
php
'; $
facebook
= new
Facebook
($facebookConfig); $
facebook
->setAccessToken($_access_token); $facebook_user_id = $
facebook
->getUser(); } // if( $facebook_user_id ) { // try { // $request…
Re: Facebook PHP SDK v5 errors on posting into facebook page
Programming
Web Development
9 Years Ago
by cereal
… the documentation to apply the correct permissions: * https://developers.
facebook
.com/docs/
facebook
-login/permissions/v2.4 Read it carefully, especially the…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
if(in_array($name,$feedsPerName)) should be if(isset($feedsPerName[$name])) I hate the trial and error, but am nowhere near a computer running
PHP
atm.
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
I get this error `Fatal error: Cannot use isset() on the result of a function call (you can use "null !== func()" instead) in F:\Webserver\htdocs\feedreader\creader.
php
on line 57`
Facebook SDK login and logout question
Programming
Web Development
13 Years Ago
by klemme
… have used it. Quite simple right, but using
facebook
php
sdk - I am not able to do such …href="app_style.css"/>'; require("
facebook
.
php
"); ?> <!--
Facebook
anbefal/send script JS SDK--> <…="app_style.css"/>'; require("
facebook
.
php
"); ?> <!--
Facebook
anbefal/send script JS SDK--> <…
Facebook (#200) The user hasn't authorized the application to perform this
Programming
Web Development
11 Years Ago
by dado.d
…;"; } } This is config.
php
PHP
Code: include_once("inc/
facebook
.
php
"); //include
facebook
SDK ######### edit details ########## $appId = '604912379583740'; //
Facebook
App ID $appSecret = '<APP…
Facebook Connect integration
Programming
Web Development
14 Years Ago
by Sahilsahni
…;); include_once CONNECT_APPLICATION_PATH . '
facebook
-client/
facebook
.
php
'; include_once CONNECT_APPLICATION_PATH . 'lib/fbconnect.
php
'; include_once CONNECT_APPLICATION_PATH . 'lib/core.
php
'; include_once CONNECT_APPLICATION_PATH . 'lib/user.
php
'; include_once CONNECT_APPLICATION_PATH . 'lib/display.
php
'; /* * FB…
facebook api for boosting post
Programming
Web Development
5 Years Ago
by Rajeswari_1
is there any one works with
facebook
PHP
SDK to boosting post?we are testing the marketing api …
Php problem coding error
Programming
Web Development
14 Years Ago
by Silenta
Am trying to get a
php
script working. I have done a few reviews and corrected… likely to be opening and closing quotes.
Php
file is here <?
php
require_once 'includes/
facebook
.
php
'; blurb...... ?> // Array Structure: "Quotes&… the front and the end of this section of the
php
. I tried putting <? ?> in at the ends …
Re: Facebook PHP SDK v5 errors on posting into facebook page
Programming
Web Development
9 Years Ago
by cereal
Ok, you have to fix two things here: **A)** add `publish_pages` to the scope: $permissions = ['publish_actions', 'manage_pages', 'email', 'publish_pages']; **B)** the third argument for `$fb->post()` must be the page access token, not the user access token which is set previously. So: $pageTokens = $fb->get('/me/accounts?…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
Is it real there is no expert here?
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
You apparently have an array with comments. Just loop them and increment a counter for every user you find in that particular feed.
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
> You apparently have an array with comments. Just loop them and increment a counter for every user you find in that particular feed. Ok thank you but can you show me interms of codes?
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
I am unsure why get_stream() returns JSON, it would be easier to return the array instead. So change that first: return $request["data"]; Then show me exactly how the returned array looks by using: print_r($this->get_stream(array("session"=>$session,"idfeed"=>($request["data"][$index]->…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
> I am unsure why get_stream() returns JSON, it would be easier to return the array instead. So change that first: >return $request["data"]; >Then show me exactly how the returned array looks by using: >print_r($this->get_stream(array("session"=>$session,"idfeed"=>($request["data"]>…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
In your foreach you can now do something like this: if (in_array($name, $feedsPerName)) $feedsPerName[$name]++; else $feedsPerName[$name] = 1;
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
After changing my code into this one private function get_stream($data) { $request=(new FacebookRequest($data["session"],"GET","/".$data["idfeed"]."/comments"))->execute()->getGraphObject()->asArray(); if(isset($request["data&…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
You are not using what I posted.
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
Ooh! I'm sory but I get confused when you say `$feedsPerName`. is it right to put into this way? private function get_stream($data) { $request=(new FacebookRequest($data["session"],"GET","/".$data["idfeed"]."/comments"))->execute()->getGraphObject()-&…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
> Ooh! I'm sory but I get confused when you say $feedsPerName. It is a new array to hold the number of replies per user, so I don't know why you didn't just try what I posted.
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
*It is a new array to hold the number of replies per user, so I don't know why you didn't just try what I posted.* Please can you show me how to construct this `$feedsPerName` from my codes below private function get_stream($data) { $request=(new FacebookRequest($data["session"],"GET",&…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
Add it after line 8.
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
Just something like this ? private function get_stream($data) { $feedsPerName=array(); $request=(new FacebookRequest($data["session"],"GET","/".$data["idfeed"]."/comments"))->execute()->getGraphObject()->asArray(); if…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
Yes, but you can move line 17 after line 18, so it is outside of the foreach loop.
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by Hilal2009
$feedsPerName=array(); $request=(new FacebookRequest($data["session"],"GET","/".$data["idfeed"]."/comments"))->execute()->getGraphObject()->asArray(); if(isset($request["data"])) { foreach($request[&…
Re: Facebook PHP SDK, how to get number of feed's comments per person?
Programming
Web Development
9 Years Ago
by pritaeas
Line 7 should be: $name = $result->from->name;
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC