Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-07-05 20:47:52

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

[howto] Adding Facebook features (via FBML)

I’ve just posted a blog on integrating Facebook features (comments, like buttons etc) into your textpattern articles. Hope you find it useful…

Facebook integration with Textpattern CMS

Offline

#2 2011-07-05 21:15:34

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [howto] Adding Facebook features (via FBML)

Thanks to Phil for this excellent tutorial, also now published on TXP Tips under Implementing Facebook services on Textpattern articles via FBML.

Tutorials like these are the purpose of the site – I hope other community members will continue to come forward with their simple tips or complex tutorials for the benefit of our entire community. All submissions are welcome.

Thanks Phil!

Offline

#3 2011-07-05 23:24:35

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: [howto] Adding Facebook features (via FBML)

Phil, you’re missing a ‘c’ in Flikr.

<li class="social" id="flikr"><a href="http://www.flickr.com/photos/design-hive/" title="see our photos on Flikr (opens external site in new window)" rel="external">see our photos on Flikr</a></li>

Offline

#4 2011-07-06 01:37:21

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: [howto] Adding Facebook features (via FBML)

Thanks Phil – timing is perfect :)

I’ll look through this later today

Offline

#5 2012-05-25 18:47:01

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: [howto] Adding Facebook features (via FBML)

In this line
<meta property=“og:image” content=”<txp:site_url />images/style/site-logo.png”>
you cannot replace the static site brand image with <txp:article_image />.
Textpattern will replace this tag with the <img src=”…” /> HTML tag.
The etz plugin does not help either.

Is there any way to strip out the html part and get just the URL assigned to the article?

Offline

#6 2012-05-26 00:58:05

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [howto] Adding Facebook features (via FBML)

giampablo wrote:

Is there any way to strip out the html part and get just the URL assigned to the article?

See images and image_url tags. E.g.

<meta property="og:image" content="<txp:images><txp:image_url /></txp:images>" />

Offline

#7 2012-05-26 09:40:21

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: [howto] Adding Facebook features (via FBML)

OK. Thanks for your solution.

I was aware that images can be used as a container tag and in context-sensitivity mode it returns first the article image field, if on an individual article page.
I forgot that it can be used as a container tag.

As a side note, I get this html

<meta property="og:image" content="http://www.mysite.com//images/99.jpg">

with a double // before images/
Not a big problem, since the image path still works. But I see the same problem in other cases.
So, I guess if there is something wrong in my setup.

Offline

#8 2012-05-26 10:06:30

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: [howto] Adding Facebook features (via FBML)

Please note that facebook FBML is deprecated now in favour of better solutions. The opengraph format is still relevant though

Offline

#9 2012-09-10 20:43:33

Corfitz Ulfeldt
New Member
Registered: 2012-08-27
Posts: 5

Re: [howto] Adding Facebook features (via FBML)

Hi Phil, thanks for this!

I’m trying to implement facebook OG meta in the new 4.5 version using this method:

<txp:if_individual_article> <txp:output_form form=“myformname” />
</txp:if_individual_article>

I’ve put it with the other meta tags on the default page, but when i go to an individual article the content isnt being outputtet. I’ve trying using other content between the <txp:if_individual_article> tags but i can’t get anything to show up. Any ideas?

Offline

#10 2012-09-10 21:06:26

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,310

Re: [howto] Adding Facebook features (via FBML)

Corfitz Ulfeldt wrote:

but when i go to an individual article the content isnt being outputtet. I’ve trying using other content between the <txp:if_individual_article> tags but i can’t get anything to show up. Any ideas?

I’d assume you’re using article_custom, which never creates individual article context, and not article. If this isn’t the reason, please open a new topic in the How Do I forum, your question isn’t about Facebook, and this topic here should remain manageable and helpful for people looking for … adding Facebook features :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#11 2012-09-10 21:27:56

Corfitz Ulfeldt
New Member
Registered: 2012-08-27
Posts: 5

Re: [howto] Adding Facebook features (via FBML)

Right you are, sorry! Originally posted the Q in Phills blog and was advised to take it here instead, my mistake.

Offline

#12 2012-12-06 08:06:47

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: [howto] Adding Facebook features (via FBML)

Facebook has a html5 option now along with their JavaScript API, so I’d recommend that over FBML, which is being phased out.

Offline

Board footer

Powered by FluxBB