Listing Facebook Open Graph Objects from an Application - facebook

According to Facebook's Open Graph API Documentation (https://developers.facebook.com/docs/sharing/opengraph/object-api/), you should be able to list object's associated with your application with:
https://graph.facebook.com/app/objects/$OBJECT_TYPE?access_token=$APP_ACCESS_TOKEN
However, when I attempt to list my application's Open Graph Articles, with
https://graph.facebook.com/app/objects/article?access_token=$APP_ACCESS_TOKEN
I get an empty array. Additionally, I get an error on the Object Browser page (https://developers.facebook.com/tools/object-browser) stating:
There are no Object Types configured for this app.
I have added Open Graph as a product to the application and there are many objects that have been created with my Application using the fb:app_id meta tag as follows:
<meta property="fb:app_id" content="MY_APP_ID">
Is there something else I am missing that needs to be done to associate an OG object with an application or enable Open Graph objects other than adding the fb:app_id meta tag to the page?

Related

Can an in-app object only be posted through an opengraph action?

I have a page inside a facebook application that is an opengraph object, when I post a custom action on this object to facebook from my app it is posted right, but when I use a facebook social plugin such as like and like that object it is not posted as that object but instead the object of my facebook application is posted on the timeline... so my question here is Can an in-app object only be posted through an opengraph action?
Nope, new OpenGraph object will be created or data will be updated for existing one once Facebook linter crawl your page to get data this will happen in several cases:
OpenGraph action referencing object published
Like button clicked for specific URL
Link to your page shared on Facebook (in direct way or via any dialogs using link, etc).
Your Like button is probably linked not to your real application URL but to URL within Facebook resulting in different Pages parsed by Facebook on Like Button click and OpenGraph action publishing.
I assume that your like button pointing to Application Tab Canvas or Application Page since links to regular application's canvas parsed correctly by Facebook.
Update:
Seems like the issue with OpenGraph tags is related to the fact that your application returning 404 (Not Found status code) for URL you provided and only returns data for HTTP (but not HTTPS) requests. If error code is returned the cached data is preserved and will not be updated until correct status code returned.
Update 2:
As you've provided real URL it's became clear that you get details for your application instead of actual page because of redirect for all unauthorized users, which lead to inability to rich the real OpenGraph data by Facebook linter.
BTW, You should be aware that every OpenGraph object MUST have publicly accessible URL.

How do you define facebook open graph objects with CUSTOM og:tags properties programmatically

I have a website with several thousands of products. I've integrated my site with FB open graph properly. each product URL now has various FB graph properties such as name, picture, description, which is exactly what I want:
ie. http://graph.facebook.com/283414328378288
HOWEVER, I want to define ADDITIONAL CUSTOM properties such as "price", "short_title", "short_description". These properties are NOT standard with the FB graph og meta tags.
I have thousands of products so ideally I want to simply add an og tag such as:
<meta property="og:price" content="35">
<meta property="og:short_title" content="awesome_product">
then after adding that, facebook would pick that up and add it to my open graph object as a custom property... however I am pretty sure that won't work. Therefore, my question is:
Is there a way to programmatically add custom properties to FB open graph objects WITHOUT going through the Facebook user interface? (http://developers.facebook.com/docs/opengraph/define-objects/) obviously by having thousands of changing products.. going through the FB interface would be an unrealistic solution to adding custom properties to objects.
You don't; there is no API to update actions, objects, etc. This is something you'll only need to do once, and there's an interface for doing so in the app settings
You need to create a Facebook App, and define the custom OG tags in the OG configuration of the App.

FB Like button giving error when clicked

I'm using the Shopp e-commerce plugin for Wordpress. I added the Open Graph Helper plugin to help automatically generate FB like buttons on each of the individual product pages that passes the product info to FB rather than generic site info (since the product page is a template).
When I click like I get an error saying that "The page failed to provide a valid list of administrators. It needs to specify the administrators using either a "fb:app_id" meta tag, or using a "fb:admins" meta tag to specify a comma-delimited list of Facebook users." even though I've added my admin ID. Page content doesn't populate the comment box, but it does post to the user's FB page correctly.
You can view an example here: http://kranedesign.com/shop/emory-in-dark-olive-with-shearling-lined-hood/
I'm not sure what the problem is but when I was creating like button generating code for this site Sunwise Sunglasses I found that the order of the the OG tags mattered, and that the Facebook Debugger page was excellent and found any problems: http://developers.facebook.com/tools/debug
There is a free plugin you can use for Shopp and Facebook like.

Open Graph Beta: can it be used with Facebook iFrame Canvas application

Playing around with Open Graph Beta I realized that the Open Graph is created for webpages outside of facebook.com. While trying to publish an action and an object I realized that an object should be defined on a webpage outside of Facebook.com.
And it looks that inside Facebook.com I cannot create objects. e.g. http://apps.faceobook.com/myNamespace/objects/car?id=102 throws me an error
Is this intended?
(OAuthException) (#3502) Object at URL
http://apps.facebook.com/myNamespace/objects/car has og:type of
'game'. The property 'car' requires an object of og:type
'myNamespace:car'.
I set the og:type inside the iFrame app to
<meta property="og:type" content="myNamespace:car"/>
but the error persists.
The bug has been fixed now.
Fixed the scraper to transform canvas app URLs into the appropriate
iframe URL. Note that we stop following any further redirects after
doing such a transformation.

Adding Open Graph Tags for Existing FB Page

I'm working to get my existing website more tightly integrated with my existing facebook page for that web page.
In the Open Graph documentation, I see ways to put in your admin ids or your app id. However I don't see a way to put in an existing Facebook page ID.
I have run into this problem in the past and when put myself as the admin id as well as all the other open graph tags, it generated an entirely new fb page for me that I don't want or need.
So, long story short - how do I add open graph tags to associate my webpage with an existing facebook page.
Thanks!
Add the following meta tag:
<meta property="fb:page_id" content="YOURPAGEID (integer)" />