Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author smashballoon

    (@smashballoon)

    Hey jandrabek,

    The Facebook API doesn’t include whether or not a post is pinned, however you could achieve the same result by manually moving a post to the top of your feed using the following JavaScript snippet:

    $(‘#cff .cff-item’).first().before( $(‘#cff_182162001806727_1043082325714686‘).css({‘box-shadow’:’0 0 10px 0 rgba(0,0,0,0.2)’}) );

    You’d need to find the post ID of the post you want to pin by right clicking on it and inspecting the element. You should see an ID on the cff-item element which starts with “cff_”. Replace the ID in bold in the snippet above with that ID, and then add the code to the plugin’s Custom JavaScript section (Customize > Misc > Custom JavaScript).

    Let me know whether that works for you, and I hope you’re having a good day!

    John

    Plugin Author smashballoon

    (@smashballoon)

    I just created an FAQ on our website for this question with some more detailed directions which you may find helpful! https://smashballoon.com/create-a-pinned-post-in-your-custom-facebook-feed/

    John

    Thread Starter jandrabek

    (@jandrabek)

    So there is no way to do that automatically and I need to replace ID every time I want to display pinned post?

    Plugin Author smashballoon

    (@smashballoon)

    I’m afraid the Facebook API doesn’t include whether or not a post is pinned so we have no way of knowing in the plugin which post should be pinned unfortunately. If Facebook changes this in the future then we’ll definitely look into adding it into the plugin, but currently there doesn’t seem to be any way of automatically getting that data from Facebook’s API. If you discover a way to get that data then let us know and we’ll look into adding it into the plugin for you!

    John

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pinned post’ is closed to new replies.