Facebook Messenger - undocumented features in Quick Replies - facebook

Through building our chat bot I've come across a few undocumented "features" The latest one I've come across is to do with Quick Replies.
I made a typo and FB responded with the following error:
Error: { message: '(#100) Param message[quick_replies][0][content_type] must be one of {LOCATION, POLL, TEXT, OPEN_NATIVE, STICKER, OPEN_APP, P2P_PAYMENT, TRANSPORTATION, CREATE_EVENT}'}
Now there's a whole bunch of Quick Reply types that are not anywhere in the documentation - the Poll one in particular sounds very interesting.
Has anyone played with these?
cheers,
Paul

Related

Unable to post reply to _some_ comments

Sometimes, when I post a reply to a comment through the graph API on a FB page (replies are enabled in the page parameters), I get generic FB "transient" errors which are not transient:
{u'error': {u'code': 2, u'message': u'An unexpected error has occurred. Please retry your request later.', u'is_transient': True, u'type': u'OAuthException'}}
A typical example is: https://www.facebook.com/VoyagesSncf.com/posts/377070219021428 where I cannot even post replies myself using the FB web interface.
I wonder if someone would know what could cause this specific FB discussion to behave this way and what I could do to detect programmatically that I need to give up on posting a reply and s
It seems to be a facebook api's bug, reported here: https://developers.facebook.com/bugs/281179468741734/
I've got the same problem while creating a new (even unpublished) post. But it is transient indeed, but it may took a few ours, when facebook will behave as expected.
I'm afraid, there is no workaround for this issue for now.

Error Parsing URL Error parsing input URL, no data was scraped

this would be yet another question for the vague Facebook Error Message:
"Error Parsing URL Error parsing input URL, no data was scraped",
as other posts regarding this issue went unanswered:
#1. by Vincent Guyard
#2. by Daniel Tiru
#3. by Fernando Quirino
#4. by user1964054
and this list goes on..
our case is a bit different, we have recently purchased a new domain name and performed
a transition from our old domain to the new one.
before the transition we were able to promote and advertise our website on Facebook.
after the transition we cannot do so neither with our new domain name nor with our old domain, attempting to do so we get a general error message:
"You've selected an object that cannot be promoted. Please choose a different object".
as if we have been black-listed for reasons which are beyond our knowledge.
The transition by it self was straight forward by adding a new binding to our website
on our IIS server for incoming requests with our new domain name, that is, we have not
changed our contents, nor did we change in our website pages code or structure, or for this matter changed our IP or migrated to another server.
when we tried to debug our url with: https://developers.facebook.com/tools/debug
we got Facebook infamous vague error message: "Error Parsing URL Error parsing input URL, no data was scraped.".
considering that we have not made any changes to our website in terms of content, structure or code, we presume that perhaps our new domain name "has a history" with Facebook.
Turning to Facebook support we were directed here..
with much respect for stackoverflow (and there is very much!), it is a big shame that Facebook detaches its self from supporting users of its own platform.
Back to our problem, has anyone encountered the scenario listed above?
or has a vague idea :) what might be the problem? and perhaps how can it be solved?
or where we can approach with it for consulting?
As for now we did not yet receive a feedback from Facebook to our issue.
Cheers!

Facebook App - {"error":{"message":"(#1) An error occured while creating the share","type":"OAuthException","code":1}}

When my app tries to post on "friends wall" sometimes i receive this error:
{"error":
{"message":"(#1) An error occured while creating the share",
"type":"OAuthException",
"code":1}
}
I'm sure to have (and to use) long access_token and publish_stream permission, in fact sometimes it works and sometimes not.
Do you have any idea about the cause of the problem?
The ability to post on a friend's wall has been deprecated and will be removed in 90 days (for the reasons described in this blog post: https://developers.facebook.com/blog/post/2012/10/10/growing-quality-apps-with-open-graph/
Whilst that doesn't directly answer your question, it does make it moot and you should take an alternative approach (also described in the post)

Real Time Update not working for some fields?

I'm checking wich fields from the User object are susceptible to RTU (real time updates); in the documentation it says:
The User object supports Real-Time Updates for all fields except the
verified property.
But, so far, for this fields:
video upload limits television significant other favorite_teams
favorite_athletes political interested_in bio updated_time
third_party_id gender user_likes languages
I've got this message:
{"error":{"message":"(#100) \"SOME_FIELD\" is an invalid field name","type":"OAuthException"}}
My application has the necessary permissions, checked by using this method (taken from this url):
https://api.facebook.com/method/users.hasAppPermission?ext_perm=SOME_PERMISSION&uid=UID&access_token=ACCESS_TOKEN_FOR_MY_APP
Am I missing something? Those fields are working for someone else or is just me?
Thanks.
I've tried the same. Facebook seems to be a little slow here. They did not implement all fields in the RTU. You can find a list of available fields here (under objects): https://developers.facebook.com/docs/reference/api/realtime/
However, even this list does not seem correct, as I did not get for example television to work either.
It is kind of odd to ask for the object "user" to get notifications about you page.. This all does not seem to be finished yet..

iPhone facebook integration

I am using Graph API in my application. I am fetching user's facebook wall feeds using graph API also getting details of particular post i.e (Like count,Comments etc).
but i want to allow user to Like and Comment any post from the application itself.
what is the request format for that?
Please help me or give any pointers.
Regards,
Sanket
You would be well served to check out the Publishing section of the documentation. It provides information such as this.
One example is liking, which is defined as:
Method: /OBJECT_ID/likes
Description: Like the given object (if it has a /likes connection)
Arguments: none
Basically, just initiate a Graph API call to something like:
[facebookObject requestWithGraphPath:#"98423808305/likes" andDelegate:self];
That will "like" a picture from Coca-Cola (ID taken from the documentation).
Edit 1
According to the documentation:
Most write operations require extended permissions for the active user. See the authentication guide for details on how you can request extended permissions from the user during the authentication step.
Are you sure you have enough privileges? Unfortunately the documentation is very unclear as to whether it serves the dual purpose of liking the object and returning the likes already on that object.
Edit 2
I did some more research into what could be causing this and came across this question and answer that indicated that the code I posted above using requestWithGraphPath:: should work. However, it does not due to a bug on Facebook's Bug Tracker.
Unfortunately, it looks like there is no way to "like" an object via the Graph API, which seems very strange to me. Perhaps it is possible with the legacy REST API instead of the Graph API?
Edit 3
Well, it looks like your best bet is the stream.addLike method of the legacy REST API which you can still call using the Facebook iOS SDK. You should be able to use the stream.addLike method to "like" something in the "stream". Unfortunately, it doesn't appear to support photos, videos, etc. Only posts and comments.
Finally i found the solution for LIKE option
We should use following method for like option.
-(void) requestWithGraphPath:(NSString *)graphPath
andParams:(NSMutableDictionary *)params
andHttpMethod:(NSString *)httpMethod
andDelegate:(id <FBRequestDelegate>)delegate
graphPath = /OBJECT_ID/likes
Paramas = dictionary with comment ,for like option use empty dictionary
HttpMethod should be POST
you should get response = true if the LIKE request is successful.