I'm creating comments to a post on FB page using Graph API /{comment-id}/comments edge. Everything works like a charm but when I'm trying to send a comment with mention as stated here nothing happens. I'm sending
some-irrelevant-text #[valid-user-id]
and what I get is nothing. To be more exact I get some-irrelevant-text but #[valid-user-id] is doing exactly nothing. Blank space
I'm using graph api v3.1
I'm trying to get comments using Facebook Graph API using this code
https://graph.facebook.com/post_id/comments?access_token=XXX
where XXX is replaced by my access token. The problem I'm facing is I'm not getting all the comments. It's end output is like this:
enter image description here
One of the solution through which I'm able to get all comments if using limit like this:
https://graph.facebook.com/post_id/comments?access_token=XXX&limit=1000
This solved my problem since I had only 50+ comments. Still looking for more better solution.
I'm trying to get access to the page_fans_city edge from the Facebook Graph API.
I am using the following query:
https://graph.facebook.com/v2.5/StrandTowerHotel/insights/page_fans_city/lifetime
For some reason though it keeps returning no data when I am using the Graph API explorer.
note: I am an admin/owner of the page
Whats interesting though is that if I just query https://graph.facebook.com/v2.5/StrandTowerHotel/insights/ then I get all the other metrics results returned but "page_fans_city" is not in the results.
I have read through and tried the following solutions already posted on stack overflow but they don't seem to solve the issue.
Getting number of people who like a page on facebook by city
Facebook PHP Graph API not returning complete data
facebook: permanent Page Access Token?
Many thanks in advance for any help you can give me
After much searching and bug fixing it ended up being the facebook api was just having issues. now working perfectly :(
I am trying to post a URL to a facebook page. using PHP SDK.
I am able to post successfully from my localhost. But on the live server, I get the result "Sorry, something went wrong".
when running the code from live server, I have no problem obtaining access_token to post to the page.
Only the posting will not work.
I tried to post the link manually using the graph api explorer. and found that
I am ABLE to post a message successfully via the graph api explorer.
I am NOT able to post a URL via the graph api explorer. I get the error
"(#100) link URL is not properly formatted"
I do encode the link that i am trying to post. and they are valid, existing links.
I even tried using http%3A%2F%2Fgoogle.com , and it would return the same error.
Some Other information
The code is executed from mydomainname.com/folder/
I have added the domain name to "App Domains" field.
Sandbox Mode is On.
When I tested from my local, I was able to post 25 links to the
page.[after which it was giving errors]. When things were not
working at the live server, I came back to locahost to again test
with 25 links and more and found things to be working fine from
localhost. I wonder if I hit some limit or my application has been
black listed.
Anyone has got any ideas?
Thanks
UPDATE
I took the URL that was used by the live server (to post link to the facebook page) , and used fiddler to post it from my local machine. and it worked.
so i am wondering whats preventing the code from working successfully from the server?
I tried the same code from another domain and it worked.
I am yet to find out if it was not working because of the way the 1st domain was sending CURL requests, or if the domain was blacklisted for posting too much in the past.
either way, facebooks error messages are not at all helpful!
If you're using your own wall, notice the difference between:
"me/feed" and "me/photos" url. The first one doesn't work!!!
I also tried the same thing but unfortunately it works for online images but not for local ones. i.e
'picture' => class_exists('CurlFile', false) ?
new CURLFile($photo, 'image/jpg') : "#{$photo}",
will not work, but
'picture' => "http://i.stack.imgur.com/VGWZD.jpg?s=24&g=1",
will work
I also had some problems with this. Weirdly enough it only worked when I sent the url to the picture without any URL encoding via the POST request to the Graph API.
Try the link without the quotation marks "". I was stuck as you but not any more without the quotation marks.
Recently I'm working with the Graph API of facebook and I got the authentication ready, though publishing to my own feed gives me a hard time..
I'm trying to find the correct URL to do this, because I am using MonoTouch and the only way to publish is using a webrequest. I tried to check what the API said but it wasn't quite clear, I'm trying the following url:
https://graph.facebook.com/myusername/feed?access_token=mytoken?message=testmessage
What am I doing wrong ?
Thanks in advance!
You are missing the parameter method with the value post.
Try this:
https://graph.facebook.com/myusername/feed?method=post&access_token=mytoken&message=testmessage