PHP - Facebook API Callback Help
Ngân sách £10-15 GBP / giờ
Our use of the Facebook API is to allow users to post content to any Facebook page their account has. They login into Facebook via our website, and once logged in, the user can have access to any of their already created pages to post the respective content to.
The desired overall purpose for the whole API is once the user has logged in, they can select which of their account's pages they wish the content to be posted to, and once selected, the content is published on those pages.
We currently have an app created on Facebook Developers, with permissions such as 'publish_pages', manage_pages' and 'publish_to_groups' which is what we need as we only post to Facebook. I have set up a login procedure on our website, and users can successfully login. The issue we are having is to do with the information that comes back to our website. The information comes back to our site like this via a callback:
object(Facebook\FacebookResponse)#18 (6) {
["httpStatusCode":protected]=>
int(200)
["headers":protected]=>
array(16) {
["ETag"]=>
string(42) ""xxxxxxxxxxxxxxxxxxxxxxxxxxxx""
["Expires"]=>
string(29) "Sat, 01 Jan 2000 00:00:00 GMT"
["Content-Type"]=>
string(31) "application/json; charset=UTF-8"
["facebook-api-version"]=>
string(4) "v3.1"
["x-fb-trace-id"]=>
string(11) "CSkI7hlwfzy"
["x-fb-rev"]=>
string(7) "4424137"
["x-app-usage"]=>
string(49) "{"call_count":0,"total_cputime":0,"total_time":0}"
["Cache-Control"]=>
string(44) "private, no-cache, no-store, must-revalidate"
["Pragma"]=>
string(8) "no-cache"
["Strict-Transport-Security"]=>
string(25) "max-age=15552000; preload"
["Access-Control-Allow-Origin"]=>
string(1) "*"
["Vary"]=>
string(15) "Accept-Encoding"
["X-FB-Debug"]=>
string(88) "x0Hjs2LYvAJx5LBVj6IzQBddE1V3B9OnCIixQmj67mPaW7yGTolCqcuWk43VFztiTRwmat9UAKmzfQJdfFTkdw=="
["Date"]=>
string(29) "Tue, 16 Oct 2018 09:07:24 GMT"
["Connection"]=>
string(10) "keep-alive"
["Content-Length"]=>
string(2) "56"
}
["body":protected]=>
string(56) "{"name":"Marketing company page","id":"xxxxxxxxxxxxxx"}"
["decodedBody":protected]=>
array(2) {
["name"]=>
string(22) "Marketing company page"
["id"]=>
string(15) "xxxxxxxxxxxxxx"
}
["request":protected]=>
object(Facebook\FacebookRequest)#16 (9) {
["app":protected]=>
object(Facebook\FacebookApp)#3 (2) {
["id":protected]=>
string(15) "xxxxxxxxxxxxxxxx"
["secret":protected]=>
string(32) "xxxxxxxxxxxxxxxxxxxxxx"
}
["accessToken":protected]=>
string(192) "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
["method":protected]=>
string(3) "GET"
["endpoint":protected]=>
string(17) "/xxxxxxxxxxxxxxxxxxx/"
["headers":protected]=>
array(1) {
["Content-Type"]=>
string(33) "application/x-www-form-urlencoded"
}
["params":protected]=>
array(0) {
}
["files":protected]=>
array(0) {
}
["eTag":protected]=>
NULL
["graphVersion":protected]=>
string(5) "v2.11"
}
["thrownException":protected]=>
NULL
}
A detailed object with arrays inside. The important part is information about the created pages like this:
["body":protected]=>
string(56) "{"name":"Marketing company page","id":"xxxxxxxxxxxxxxx"}"
["decodedBody":protected]=>
array(2) {
["name"]=>
string(22) "Marketing company page"
["id"]=>
string(15) "xxxxxxxxxxxxxxxxxx"
}
However we can't find a way of accessing this information and using it usefully (to add our Facebook pages into a dropdown, for example), if anyone can help, looking at the whole object, the path to access this information. Also each section has ':protected' as apart of it, we don't know if this is what is stopping me from accessing the information I need and how I can remove it if it is.
9 freelancer đang chào giá trung bình £13/giờ cho công việc này
Hello , How are you? I just saw your project description carefully. I am very interested in your project. I have rich experience in Facebook API callback function. I am ready to start your project immediately. I Thêm
Hello, Hope you are Hale & Healthy. I am highly interested to work on this project as I great experience working over different-2 API integration to websites based on client needs. I am a PHP expert and have b Thêm
Dear Client, Hope you are doing well!! I have worked on several number of API like Facebook, Twitter, Yahoo, Google Apps, Dropbox, Pipedrive, SOAP, REST, Asana,JSON, Eventbrite api, twillio api.I am ready to add cr Thêm
Hello, I read your complete job description and you are looking for Facebook API callback help. I am the perfect fit for this job according to your requirements. Over the last 5 years, I am developing website Us Thêm
I have vast experience in core Php and Codeigniter framework. I have developed many projects in Codeigniter and core Php like Management system, eCommerce website, Customer relationship management (CRM) etc. I can prov Thêm