social-feed
social-feed copied to clipboard
Plugin not working
I am having trouble getting this plugin to work: http://randybrockdev-randybrock.nationbuilder.com/. All dependencies are loading and initialization looks good, but nothing is showing up in .social-feed-container Ideas, anyone? Thanks
f12 in chrome is your friend:
<script>
$(document).ready(function(){
$('.social-feed-container').socialfeed({
// INSTAGRAM
instagram:{
accounts: ['@randybrockforvt'], //Array: Specify a list of accounts from which to pull posts
limit: 2, //Integer: max number of posts to load
client_id: '8a9d3a4a156a4d268bfa2daf874058d1' //String: Instagram client id (option if using access token)
access_token: '3625209983.8a9d3a4.7c0b180f844c4962989f50bcc0faab24' //String: Instagram access token
},
// General Settings
length:400 //Integer: For posts with text longer than this length, show an ellipsis.
});
});
</script>
as you can see you forgot the comma after client_id
After adding in the missing comma, Chrome's console was showing the following error on line 514 of jquery.socialfeed.js:
jquery.socialfeed.js:514 Uncaught TypeError: Cannot read property 'id' of undefined.
var url = Feed.instagram.api + 'users/' + user.id + '/media/recent/?' + authTokenParams + '&' + 'count=' + options.instagram.limit + '&callback=?';
After referencing Issue 177 and following instructions by @MelchnerRoman, I was able to resolve that particular issue.
Now the console.log message, "All posts collected!" is displaying, but the HTML is not displaying the Instagram feed.
Ideas?
please use template or template_html
plus you have not added any placeholder in your template_html
just to remember the example:
'<article class="twitter-post"> \
<h4>{{=it.author_name}}</h4><p>{{=it.text}} \
<a href="{{=it.link}}" target="_blank">read more</a> \
</p> \
</article>'
this is yours
'<article class="insta-post"> \
<h4></h4><p> \
<a href="" target="_blank">read more</a> \
</p> \
</article>'
Placeholders are;
{{=it.author_name}} {{=it.text}} {{=it.link}}
all are missing and the plugin cannot place the content in the right place.
@HartLarsson, I have added the placeholders, they just aren't rendering. See below:

@maxcoyote you need to write either template or template_html in your js, so that it knows you are using a html as template or write the template yourself in template_html
. Simply remove the line
template:"insta.html",
if they not render the plugin cannot read. Have you a sort of html processor/optimizer on your site??
Please remove the line as stated by me and by @MelchnerRoman :
template:"insta.html",
I suggest anyway to use the insta.html template to avoid that your script is processed and your placeholder disappear.
No feeds are showing after clicking search button whats the problem? please help me out!
please don't use the demo, install your version with your fb APP ID/KEY
I am using my fb APP ID/KEY then too it is not showing.
there is no search implemented in the normal demo. What kind of search field you still speaking about? have you implemented correctly the code? (not the version of the demo)
Yes i implemented the code correctly but now only twitter is working facebook and instagram is not working