Question

trying to improve my question asking etiquette, so I'll state my aim, ask my question, then follow up with what research I have done.

Aim: we are building a new bolt-on subsite to give to possibly many end clients to place on their server, so their site may be built on Windows or Unix. With this in mind, we have opted with building it in HTML and Javascript. The bolt on will produce a recommendation for a product after a series of questions and the user will have the opportunity to Like the recommendation to Facebook.

Question: If the correct meta og tags in the code were indicated to an end client, could they replace the domain in the og:URL?

Research: I have looked for a similar problem on this site, but not found anything related - apart from What's the difference between the Like button with or without Open Graph META tags? I have created a Test App and have linked it to my test url on my server and understand that when the Like is clicked, Facebook reloads the page and gathers the og meta data. I have used this knowledge to implement a random product generator using JQuery to write out a different og:description to test out the idea that the end user can get any one of many recommended products that they can Like on the same end URL (eg http://www.domain.com/yourRecommendedProduct.html).

I also understand that if the URL is changed on my test server and I call my app using the fb:app_id, the app uses the Website url to call my original URL and Likes the old og:description.

In the subsite documentation, I hope to be able to tell the end clients that they can edit og:url for their domain, og:image for their company logo - og:description will be generated on the fly using Javascript through a series of questions.

But from what I have seen, if you edit the og:url, it won't match the one in the app.

Can you implement the FB Like button using the Open Graph tags whilst NOT linking to a FB app? Just read something else that appeared on the Similar Questions pane that seemed to say that the Open Graph thing was to create a link between a single page and create a Page within Facebook - which it seems is beyond what I require. So I've probably missed a step somewhere in just creating a silly simple Like button with Meta og data??

many thanks for any pointers or help Frank

Was it helpful?

Solution 2

http://forum.developers.facebook.net/viewtopic.php?id=71904

This answers all my questions. How to create a Like button easily and simply without using an App - the Official FB documentation doesn't drill down from a beginners to advanced level of tutorials which IMHO it should - might lead to less questions on here.

Also any newbies here reading this; once you've updated your code and sent to server, send the link through to the FB Debugger as it seems to refresh the content at FB.

Also use "FB Insights" to find out your fb:Admins number.

Thanks for help DMCS.

OTHER TIPS

As you pointed out Facebook's linter does not run JavaScript.

So you've gotta get your web-server to spit out the correct og tags at the request of the linter. So the URL you use in the Like code is going to be crucial. You'll need a way for that URL to be unique and also for the web-server to know what og tags to render out for it.

So your solution is going to either know the unique urls of each product, or your solution is going to need to include server side code that produces unique content for each product (maybe something like /getProduct.php?id=123 or REST like /products/123/).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top