Topic-icon Social Stream link to post?

Active Subscriptions:

None
9 years 5 months ago #48037 by spmetas
Hello,

I need that every post could have a Link on Title (not IMAGE title!) to the Facebook Post.
I have checked $this variable in media\sourcecoast\themes\scsocialstream\default\facebook.php
and it does not contain this URL, is there any way to get/set it?
The topic has been locked.
Support Specialist
9 years 5 months ago #48043 by alzander
You'll have to do some testing, but I think you can do what you're looking for. Basically, each Feed post gets a URL like:
www.facebook.com/SourceCoast/posts/841713419194409

So, we just need to get the page name and ID of the specific post and build the URL accordingly. To get the right info, edit the /components/com_jfbconnect/libraries/provider/facebook/channel/page.php file. Around line 42, you'll see:
$post = new JFBConnectPost();
Add the following line after that:
$post->id = $data['id'];
Then, in the facebook.php template file you edited above, you can add a link to the post like:
<a href="https://www.facebook.com/SourceCoast/posts/<?php echo $this->id; ?>">Link to post</a>
Obviously, change SourceCoast to your Page Name.

There is a way to dynamically get the Page Name so it's not hard-coded as well, but for now, test that. The above has *not* been tested by us, but we definitely like the idea and will probably implement it in an upcoming release. Your feedback beforehand would be great!

Thanks,
Alex
The topic has been locked.