social-feed icon indicating copy to clipboard operation
social-feed copied to clipboard

Plugin not working

Open maxcoyote opened this issue 8 years ago • 11 comments

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

maxcoyote avatar Aug 24 '16 06:08 maxcoyote

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

HartLarsson avatar Aug 24 '16 12:08 HartLarsson

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?

maxcoyote avatar Aug 29 '16 18:08 maxcoyote

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 avatar Aug 30 '16 02:08 HartLarsson

@HartLarsson, I have added the placeholders, they just aren't rendering. See below:

screen shot 2016-08-29 at 9 04 03 pm

maxcoyote avatar Aug 30 '16 03:08 maxcoyote

@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",

MelchnerRoman avatar Aug 30 '16 07:08 MelchnerRoman

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.

HartLarsson avatar Aug 30 '16 08:08 HartLarsson

No feeds are showing after clicking search button whats the problem? please help me out!

sayaaa14 avatar Aug 21 '18 06:08 sayaaa14

please don't use the demo, install your version with your fb APP ID/KEY

HartLarsson avatar Aug 22 '18 17:08 HartLarsson

I am using my fb APP ID/KEY then too it is not showing.

sayaaa14 avatar Aug 23 '18 05:08 sayaaa14

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)

HartLarsson avatar Aug 24 '18 21:08 HartLarsson

Yes i implemented the code correctly but now only twitter is working facebook and instagram is not working

sayaaa14 avatar Aug 27 '18 04:08 sayaaa14