FB mentions doesn't work while using /{comment-id}/comments - facebook

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

Related

Pulling a single facebook comment by id fails OAuthException

There seems to be something wrong with the facebook graph api right now. Even using API explorer tool generates the error. Can anyone pass a regular request for a single comment without throwing this exception?
https://graph.facebook.com/v2.6/|comment-id|
I have been facing this problem for close to 24 hours now. I could not read a comment by the Facebook API anymore. It has been working prior to this.
Pulling comment - https://graph.facebook.com/v2.6/[comment-id]?access_token=[access-token]

facebook graph page/picture edge returning questionmark

So this is a little bit odd, I have a website that trawls facebook looking at specific pages and requesting data from them.
As part of this I request the picture object of the page: http://graph.facebook.com/285361880228/picture
This returns a question mark instead of the page profile picture.
Other links to pages seem to work without a problem.
http://graph.facebook.com/1485760851674064/picture
Does anyone know what may be causing this?
I am currently using version 2.3 of the API.
I'm assuming it has something to do with the page setup, as according to the facebook documentation,I should be able to read this.
https://developers.facebook.com/docs/graph-api/reference/v2.3/page/picture/
It seems like the facebook page has not been published. Try publishing the page and access the image using same link. It will work.

(#100) link URL is not properly formatted when posting to a facebook page

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.

Using FB debugger

https://glacial-spire-4346.herokuapp.com/repeater.php?fb:app_id=431519396898110 &og:type=fb_sample_mani_test:meal &og:title=Pizza &og:description="Pizza" &og:image=http://www.sugarmedia.com/nyccookbook/images/pizza.jpg &body=Pizza
When I used this URL in the facebook debugger an error was shown as to "og:url" property is needed. Also an error was shown when using the url in Graph API explore.
But as soon as I removed the words "repeater.php" from the url everything worked fine. FB debugger gave no error n I was able to publish using the graph API.
Any reason as to why this is happening?
PS: This is the sample code from developer.Facebook.com n uses "repeater.php"

Repro needed : 'picture' graph field not working for posted links

I need verification on an error to see if it is just me or a FB bug.
The preview image link of posted links doesnot seems to be working, either by Graph or FQL.
Try this one :
https://www.facebook.com/coca-cola/posts/168694756574160
With the graph explorer, go to
https://graph.facebook.com/168694756574160
and click on the "picture" link. Does the preview image appears ? I have a blank screen.
I see this behaviour on every posted links I could try.
Thanks for trying this on your side. If it is a FB bug, I will create a bug report!
The /picture connection of most objects returns a HTTP 301 redirect to the image's URL on the CDN. This will not work with the Graph API Explorer as it hasn't been coded to respond to the redirect.
The redirect allows you to put (for example) https://graph.facebook.com/USER_ID/picture into an <img> tag directly
If you want to retrieve the picture as a string, access /OBJECT_ID?fields=picture instead