Facebook like button not showing when using a dynamic app id - facebook

I'm building a website for a franchise organization that has many franchisees. Each franchisee claims it's own part of the site represented within the path - for example the main site url is bigcompany.com and the the Atlanta store url will be bigcompany.com/atlanta. When trying to place the like button on the page it works when given the main organization's app id, but shows nothing when given the franchise app id.
I've tried using the url debugger on facebook (https://developers.facebook.com/tools/debug/) and the error that I receive is
Object Invalid Value: Object at URL 'http://bigcompany.com/atlanta' of `type 'website' is invalid because the given value '12345678901' for property 'fb:admins' could not be parsed as type 'fbid'.`
I'm not sure what that means and haven't found a suitable answer so far.
Why is the like button not showing? Thanks

Related

How to add applink to custom story via Object Browser? (hosted object)

I'm trying to post custom story with applink. I have defined action type complete and an object step - so user can "complete a step" inside app. Then I defined one step using Object Browser. How can I add applink via Object Browser?
There is a field al:android, which I assume needs to be filled with data. There is a hint stating that I should put there JSON object or array. So I did.
Tried with:
{"package":"com.example.myapp","class":"com.example.myapp.MainActivity","app_name":"My Example App"}
I've got error:
Is there a way to make this work?
You can use Facebook Mobile Hosting API to create App Link objects. Here is documentation: https://developers.facebook.com/docs/applinks/hosting-api
Should get in return something like this: {"id":"643402985734299"}, this is the ID of hosted applink - try with it.

Unable to create custom facebook object

I'm making a Facebook canvas application, and I want give some of the objects there "Facebook presence" - I want to allow users to comment on them and to like and share them via Facebook.
I understand I need to do it via OpenGraph. So I created an object type on my OpenGraph and named it item. I've tried to create an instance of item with the following POST request:
url:
https://graph.facebook.com/https://graph.facebook.com/me/objects/ilender_local-test:item
body:
method=POST&object=%7B%22type%22%3A%22%5C%22ilender_local-test%3Aitem%5C%22%22%2C%22title%22%3A%22My+First+Item%22%7D&access_token=...
The access_token, ofcourse, is the access token for my app.
Now, the result I get is a simple JSON false - no error message - but I assume I failed since when I succeed in creating an object on Facebook I usually get the id of the newly created object.
What am I doing wrong?
My stupidity knows no end. https://graph.facebook.com/https://graph.facebook.com? What was I thinking...

Facebook authentication within a Page Tab

According to the specification here: http://developers.facebook.com/docs/authentication/pagetab/ I want to autorize user with the server-side flow on page tab. I use PHP-SDK.
My redirect_uri parameter is build like that:
https://www.facebook.com/pages/null/PAGE_ID/app_YOUR_APP_ID
and I keep getting:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
I was trying many different settings combinations. Now I have filled fields: App Domains,Site URL,Canvas URL,Secure Canvas URL,Page Tab URL,Secure Page Tab URL but still without success. Addresses are ending with / and are all the same.
Link are build proper by the sdk. I test building it "by hand" without encoding of redirect_uri param and redirect link build like that:
https://www.facebook.com/PAGE_USERNAME/app_YOUR_APP_ID
https://www.facebook.com/pages/Page_Title/PAGE_ID?sk=app_YOUR_APP_ID
Can someone tell me what i'm doing wrong?
The answer to that question is that facebook documentation is incorrect. Format of return_uri that worked is:
https://www.facebook.com/pages/null/PAGE_ID?sk=app_YOUR_APP_ID
The format of return_uri changed again, the new format is:
https://www.facebook.com/PAGE_NAME?sk=app_YOUR_APP_ID

Can't create a new open graph achievement

I keep getting the error:
"The given selector string \"game:points\" is invalid for Ent with ID 10150679224277659"
when trying to create a new achievement
(using https://graph.facebook.com/myappid/achievements/?method=post&access_token=...achievement=newurl)
this new achievement is totally different and has a different URL so why it keeps telling me about the other ID (10150679224277659) in this error?
Any ideas?
The URL you're trying to share must be already detected as a different object; are you using an og:url tag on the avchievement URLs which point to another page?
According to http://graph.facebook.com/10150679224277659 that's of type 'game'
THE URL of that object (http://apps.facebook.com/rummikubilan/themes/rummikub/achievement/win.aspx?title=3+parrots+in+a+row&description=Ilan+earned+3+parrots+in+Rummikubs+Jungle+World+and+won+25+Joker+credits\u002521\u002521+Super+cool\u002521&amount=25) doesn't look right - it seems to have a description there which wouldn't make sense for an achievement because there's a name hardcoded into it.
Putting that URL through the debugger doesn't work either, When i go there via HTTPS it fails because you've not configured the secure URL, and in HTTP mode it fails with a 404 error:
You should probably start with a different URL path for the achievements and make sure the meta tags are correct and resolvable, and that the og:url tags don't redirect elsewhere; the Achievement docs have some good examples: https://developers.facebook.com/docs/achievements/

What are the "base URLs" for status, photos, etc?

I developed an app that looks for specific terms using the facebook api (search).
Every result comes with an ID for the item that can be of many types like "status","photos",etc.
I remember that some time ago I could surf facebook and get this URLs from the browser address bar, but now with some updates that facebook has made it seems to be all AJAX based calls and it seems like you do not have a "specific page" for each item.
I looked over the web and could not find anything regarding this.
Is there any way I can get a "photo id" from the API and open it like "http://facebook.com/photos/0293820293842"?
Thanks for any clue.
https://graph.facebook.com/{id}/picture
https://graph.facebook.com/40796308305/picture (by page id)
https://graph.facebook.com/cocacola/picture (by page's name)
https://graph.facebook.com/4/picture (by user id)
https://graph.facebook.com/4/zuck (by user name)
after some time I just gave up trying to get the picture from the data provided by the search API.
From the api I get entries of type "photo" but they do not match with the API documentation found at http://developers.facebook.com/docs/reference/api/photo/ since I do not receive the fields "picture", "source" or "images" (they just does not exist in the results from a search)
Looking to find a way to use the approach of "setting up the URL from the fields received from the API" I could not get any sucess either.
That's one case... I set up a search for "pepsi"... and within the results I got a "photo" object.
In this object I have the following fields:
id: 100002307882828_188072634633218
author\id: 100002307882828
link : "http://www.facebook.com/photo.php?fbid=320417371337648&set=a.133681116677942.17717.131381520241235&type=1" (this link really points to the photo's page, but is not the photo itself)
object_id: 320417371337648
I used the URL you provided as a "base" and tried to setup some combination that returns me a photo but I always get "Content not found" as result.
The only way I could find the final photo URL is to make another call to the API using the Photo Id as parameter (but I would need to do a lot of calls to the API and this just do not fit my scenario)
If I call https://graph.facebook.com/320417371337648 I get everything I need from the photo, but this is the "another call" I would need to perform for each result I get.
Thanks a lot for your help,
Regards,
Victor Reboucas