Site Links
Pricing & Order
Members Area
Support Options
Who's Online Now
0 registered members (), 71 guests, and 142 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Portsmouth, RI
Posts: 91
Joined: January 2009
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 15
isaac 9
SteveS 9
Ruben 6
Morgan 5
jorb 4
Latest Photos
Testing to drag photos
Comfortable Cats
BSA photos
Previous Thread
Next Thread
Print Thread
Facebook Per-Page Customization #239781
09/30/10 06:31 PM
09/30/10 06:31 PM
mmem700  Offline OP
Joined: Jun 2008
Posts: 36
I'm working on putting Facebook "Like" button on certain posts on our forum.

The catch is that we need to have certain META tags present on the page which will be specific to that post (technically a topic). In other words, 1 topic will have to have a different set of META tags than another topic.

Is there a way to create topic-specific headers?

We're currently using UBBT 7.3.1. Is there perhaps a new feature that allows this in the most recent 7.x release?

Is this feature going to be available in the 8.x series? If so, we may just wait for that

If not, we can use Javascript injection to create the tags dynamically from the post itself, but I just wanted to know if there was a simpler way.

Thanks in advance.

If anyone is interested, I can followup this post showing how to do Javascript META tag injection.

Today they call you "crazy".
Tomorrow they call you "ahead of your time".
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Facebook Per-Page Customization [Re: mmem700] #239783
09/30/10 08:12 PM
09/30/10 08:12 PM
SD  Offline
Former Developer
Joined: Apr 2007
Posts: 4,313
SoCal, USA
.js injection by manipulating the DOM works, but i'd recommend just modifying plus a tpl or two to do the work.

you are more semantic at the server level and can pass the optional meta to smarty for output..


Javascript Injection Won't Work [Re: mmem700] #239796
10/02/10 05:09 AM
10/02/10 05:09 AM
mmem700  Offline OP
Joined: Jun 2008
Posts: 36
I've been researching this and found that Facebook does not mention that its spider has the ability to run javascript. This means that javascript injection of OpenGraph headers (these are the header META tags that make your page act just like a Facebook "Page" - a good thing) will not work.

See, Facebook requires that your page include these headers in order for your page to act just like a Facebook "Page". Without them, your page will not be included in the "social stream" when a user clicks the "Like" button. (bummer)

So, the next area of research is to find the best way to add header tags server-side. The only catch is this: I have to know what post number is being viewed so the proper OpenGraph META tags can be built for each particular post that includes a "Like" button.

This will require me to know more about the UBB Threads architecture.

Does anyone have tips on where I can learn more about this?

In short, I need to know how to insert header tags server-side. Perhaps is the key, as you mentioned.

Also, I need to be able to know what post number is currently being viewed. Since I'll be in PHP (I assume), then I can _GET[] the "Number" element on the query string, but perhaps there's a better "UBB Threads"-ish kind of way???

Thanks in advance!


The process will be something like this:

1. Get post number

2. Search the database to see if any OpenGraph META tags are supposed to be associated with this post number.

3. If so, insert the appropriate META tags for this post number.

Today they call you "crazy".
Tomorrow they call you "ahead of your time".

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Private Message, Opt out of conversation
by jorb. 12/04/18 10:11 PM
Disable IP display in Who's Online?
by Baldeagle. 11/29/18 09:05 PM
Permissions problem
by Baldeagle. 11/25/18 09:44 PM
Reddy Kilowatt
by SteveS. 11/20/18 08:30 AM
by Morgan. 11/18/18 02:33 PM
Forum Statistics
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.2