Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-07-29 12:54:24

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Allow Facebook vars from timeline urls

Hi,
I’m having an issue where when someone likes an article on the site it post it to the facebook-timeline,
with a link back to the site looks like this:

http://teder.fm/shows/%D7%9E%D7%97%D7%99%D7%AA+%D7%91%D7%A4%D7%97%D7%99%D7%AA?fb_action_ids=507734619251967&fb_action_types=og.likes&fb_source=timeline_og&action_object_map={%22507734619251967%22%3A10151000317983264}&action_type_map={%22507734619251967%22%3A%22og.likes%22}&action_ref_map=[]

So if you visit it
(copy paste it to your addressbar)
You will get a “Nice try.” message,
how can I solve this please?

This is the link without the facebook addition: http://teder.fm/shows/%D7%9E%D7%97%D7%99%D7%AA+%D7%91%D7%A4%D7%97%D7%99%D7%AA

Or the Hebrew version of the url: http://teder.fm/shows/מחית+בפחית

Or the smd_shorturl link: http://teder.fm/58

Does my URLs are fine?

Last edited by THE BLUE DRAGON (2012-07-29 12:54:59)

Offline

#2 2012-07-29 13:31:53

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

Re: Allow Facebook vars from timeline urls

The nice try message is due to the Maximum URL length setting found from Textpattern’s Advanced Preferences. The setting limits all URLs to certain length and lifting that limit helps if you need access longer URLs.

You may also try to aid the issue by only supplying ASCII characters and shorter URLs to Facebook. Facebook’s like button widget should be able to take href parameter which can be used to set custom/fixed URL destination instead of the current page. Since you are using smd_shorturl, you could use the short link as the like’s destination. For example setting the like button’s href for individual article pages to:

<txp:site_url /><txp:article_id />

Offline

#3 2012-07-29 14:04:28

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: Allow Facebook vars from timeline urls

Gocom wrote:

The nice try message is due to the Maximum URL length setting found from Textpattern’s Advanced Preferences. The setting limits all URLs to certain length and lifting that limit helps if you need access longer URLs.

Thanks! that helped, I changed it to from 200 to 500, is it really bad for security or is it fine please?

Gocom wrote:

You may also try to aid the issue by only supplying ASCII characters and shorter URLs to Facebook.

Does using ASCII you mean to use the “ugly long looking urls”?
What I’m doing now is to just copy the article title in Hebrew to the url-title field and changing each space with a plus (בלה+בלה)
It all started in this topic: http://forum.textpattern.com/viewtopic.php?id=38203
Is it OK ?

Gocom wrote:

Facebook’s like button widget should be able to take href parameter which can be used to set custom/fixed URL destination instead of the current page. Since you are using smd_shorturl, you could use the short link as the like’s destination. For example setting the like button’s href for individual article pages to:

<txp:site_url /><txp:article_id />

That’s what I’m doing, but facebook keeps converting them to the full bad looking urls :/

Offline

#4 2012-07-29 14:29:52

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

Re: Allow Facebook vars from timeline urls

THE BLUE DRAGON wrote:

Thanks! that helped, I changed it to from 200 to 500, is it really bad for security or is it fine please?

It’s fine. The limit doesn’t really even share a real purpose, well, you can technically even bypass the limit since Textpattern listens more than just HTTP GET. There is nothing to worry about security-wise about lifting the limit, especially not in such small increments.

Does using ASCII you mean to use the “ugly long looking urls”?

Are you referring to Textpattern’s default trans-coding? Ugly is subjective, especially with a correct transliteration table. But no, I was referring to the short URLs.

Is it OK ?

If you really want to do that, but I shall echo Robert.

That’s what I’m doing, but facebook keeps converting them to the full bad looking urls :/

Potentially it resolves redirects, using the final destination, or outright ignores the href attribute.

Offline

#5 2012-07-29 16:34:09

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,340
Website GitHub Mastodon

Re: Allow Facebook vars from timeline urls

THE BLUE DRAGON wrote:

It all started in this topic: http://forum.textpattern.com/viewtopic.php?id=38203
Is it OK ?

No, it is not “OK” i.e. “RFC-compliant”. But it works in real life.

Apparently, there’s an ISO standard for Hebrew transliteration. As we lack the cultural background it’d be convenient if you could provide us with some feedback whether this transliteration would be useful for Hebrew sites. We could then add it to the core.

Offline

#6 2012-07-30 11:13:35

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: Allow Facebook vars from timeline urls

Thank you both very much,
If I understand right by using the ISO transliteration mentioned by Robert -
a URL in Hebrew like this:
example.com/בלה+בלה+בלה
(bla bla bla)
will translated and look like this:
example.com/bʾlʾ+bʾlʾ+bʾlʾ
Then please don’t, LOL!
The ASCII is better, you better not be able to read the url instead of trying to fake it into even more weird what-ever-is-it ;)

I’m going to face soon with the Japanese version of the same site
ohh…why they couldn’t just all be in English :(

Offline

#7 2012-07-30 11:17:02

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,340
Website GitHub Mastodon

Re: Allow Facebook vars from timeline urls

It’d be example.com/blh-blh-blh. Here is an interactive converter for you to try.

Is this better/worse/wtf?

Offline

#8 2012-07-30 11:44:44

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: Allow Facebook vars from timeline urls

wet wrote:

It’d be example.com/blh-blh-blh. Here is an interactive converter for you to try.

Is this better/worse/wtf?

1. wtf!
2. But it does makes it shorter then the ASCII, but still totally not readable.

Most of the Hebrew sites I know (I don’t usually visits Hebrew sites) are using messy urls.
If I will face with more issues (probably will) with that stupid-copy-paste titles into the url-only-title field then I believe I will just give-up and go on a permanent link mode of section/id using gbp_permanent_links plugin, but it does takes all the fun from it.

Last edited by THE BLUE DRAGON (2012-07-30 11:45:05)

Offline

Board footer

Powered by FluxBB