t=
parameter in a share URL with a t=
Facebook query parameter -- unless you are creating the share URL incorrectly.{BOARD_URL}
can be used in any phpBB template to create an absolute URL.I understand what you mean. But the questions are because countless people ask the same things again and again without ever telling what they've done and sketching their skills. So I'll say it once and expect you to follow it precisely and carefully.gemviper2 wrote:I really wish people would just answer the question (or not answer at all) and not go into "why do you want to do that" as a response
Code: Select all
// Send vars to template
$template->assign_vars(array(
Code: Select all
/*** 2012-11-17 BEGIN AmigoJack
Provide URI encoded full topic URL and title ***/
'FULL_URL_ENCODED'=> urlencode( generate_board_url(). "/viewtopic.$phpEx?f=$forum_id&t=$topic_id" ),
'TOPIC_TITLE_ENCODED'=> urlencode( $topic_data['topic_title'] ),
/*** 2012-11-17 END ***/
Code: Select all
<a href="http://farcebook.com/sharer.php?u={FULL_URL_ENCODED}&t={TOPIC_TITLE_ENCODED}">farcebook</a>
I don't fault either facebook OR phpbb, I just said they share a parameter which makes passing a topic title to facebook impossible with the static url(not their api or javascript or iframe, just the static method).I fail to understand why you fault phpBB for not being able to work around a potential bug in the Facebook share API.
Right.gemviper2 wrote:I take it you're not a fan of farcebook?
It's just a missing feature: there should be a way to encode/mask a template variable's value when accessing it. For example we already have thegemviper2 wrote:example: facebook.com/sharer.php?u=phpbb.com/f=4&t=480&t=NOT GOING TO WORK
{LA_*}
prefix, which takes language definitions and masks it for a proper JavaScript string, so it's output would become AmigoJack\'s \"example\"
. We just don't have anything to encode URL components. It's sad that nobody in this topic seems to know what a valid URL must look like.Good that we have you around then.AmigoJack wrote:It's sad that nobody in this topic seems to know what a valid URL must look like.
I disagree...that IS a bug in the Facebook share API. Thegemviper2 wrote:So it's not a bug on either phpbb or facebook, it's a rather annoying conflict. Yes, I tried adding the title first and url second by changing around the facebook parameter order but that causes it to just post the url as both title and url. The order matters on their end.
u=
parameter should be specified last to avoid the very conflict you're having, but as you found out, Facebook will not allow it.AmigoJack wrote:It's sad that nobody in this topic seems to know what a valid URL must look like.