solved Facebook Feed Module

MAD
MAD
@madc
7 years ago
600 posts
Is there any plans for making a facebook feed module?
We currently use one on our joomla site which works well and the users love it.
Attached is a screenshot of our current site.
facebook.jpg
facebook.jpg  •  50KB




--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 05 Feb 2014 01:47:22AM
michael
@michael
7 years ago
7,167 posts
Does it need to be a module?

You could add another field to their profile with the 'Form Designer' then use that info in the templates to pull in the feed.
Eddy
Eddy
@eddy
7 years ago
479 posts
Very nice, something I would like as well.
paul
@paul
7 years ago
4,024 posts
This is the format for getting feeds from Facebook -
http://www.facebook.com/feeds/page.php?format=rss20&id=517826381564644
That is the feed from JR's FB page
So yes, a custom profile text form field for users to enter their feed number, then some template work to show it.
Checkout the (free) jrFeed module to see how that does it.


--
Paul Asher - JR Developer and System Import Specialist
MAD
MAD
@madc
7 years ago
600 posts
Thanks @michael once again!

Worked like a charm.

This is what I did
--------------------------------------------------------------------------------
IF YOU ARE USING A GENERIC TEMPLATE DO THESE EDITS IN THE ACP AND MAKE THEM ACTIVE
*I am not. I am using a cloned skin so I can update as i wish
--------------------------------------------------------------------------------

First open up a user profile ( Or Your Own ) logged in to your site as Admin and click on the Cog to open the edit section.
Then click on: FORM DESIGNER.
Add a field called :- profile_facebook
Then on next screen Add your label eg. Facebook
Add some help text
Validation needs to be set to: (string) a valid URL
Add which group can use this
Then tick Active and Save.

---------------------------------------------------------------------------------

Then go to: http://www.facebook.com and login
Then go to: https://developers.facebook.com/docs/plugins/like-box-for-pages/
On that page set the box up how you like then click: GET CODE
Thats all we need from facebook
*Don't worry about which URL you are using as we are going to change that.You just want the code

----------------------------------------------------------------------------------

Add the script code to your header.tpl :-

This goes under the opening body tag in your header.tpl in your skin if you are using the ACP
If you are not using a generic skin, just hardcode your skin via: skins/Your-Skin/header.tpl in your root directory

The code will look something like this
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=356669974361215";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Click Save

-----------------------------------------------------------------------------------

Now work out where you want it placed on your page.
*I am using the Nova Skin so your css classes may be different.

Open :- profile_header.tpl

Place similar code to this:-

<!--FACEBOOK-->
{if strlen($profile_facebook) > 2}
                <div class="block inner leader mb8">
                    <span class="title">Facebook</span>
                </div>
                       <div class="block finner mb8 mr8" style="overflow:auto;">
                           <div class="fb-like-box" data-href="{$profile_facebook}" data-width="345px" data-height="600px" data-colorscheme="dark" data-show-faces="true" data-header="false" data-stream="true" data-show-border="false"></div>
                       </div>
{/if}
<!--END FACEBOOK-->

Notice in the above that we are calling our string that we created earlier. eg. data-href="{$profile_facebook}"
That will populate everyones pages with their individual facebook accounts

Change the above to suit your site.
The code above is my like-box i generated at facebook. Your code will be different so paste your code in here
eg.

<!--FACEBOOK-->

{if strlen($profile_facebook) > 2}

<!--REMOVE THIS IF YOU DON'T WANT A HEADER-->
                <div class="block inner leader mb8">
                    <span class="title">Facebook</span>
                </div>


<!--CHANGE YOUR CLASSES TO SUIT YOUR SITE-->
<div class="block finner mb8 mr8" style="overflow:auto;">


<!--ENTER YOUR FACEBOOK CODE HERE-->
<div class="fb-like-box" data-href="{$profile_facebook}" data-width="345px" data-height="600px" data-colorscheme="dark" data-show-faces="true" data-header="false" data-stream="true" data-show-border="false"></div>

<!--END CHANGE DIV-->
</div>

{/if}

<!--END FACEBOOK-->

Now when your users sign up they can add their facebook page and it will display on their profiles.

I also put this on my home page for our site

Just put similar code to this in your :- index.tpl

        <div class="col3">
            <div class="mb8">
                <div class="inner leader mb8 mr8">
                    <span class="title">Facebook</span>
                </div>
                       <div class="finner mb8 mr8" style="overflow:auto;">
                           <div class="fb-like-box" data-href="https://www.facebook.com/Jamroomdotnet" data-width="250px" data-height="600px" data-colorscheme="dark" data-show-faces="true" data-header="false" data-stream="true" data-show-border="false"></div>
                       </div>
            </div>
</div>

Replace the anchor in the fb-like-box section above with your direct facebook page ie
data-href="https://www.facebook.com/Jamroomdotnet"

Change it to your Facebook URL ie

data-href="https://www.facebook.com/myFacebookUrl"

That should be it!


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 11 Dec 2013 06:32:31AM

Tags