Vine Function Required

Discussion in 'PHP' started by ibadullah, Jan 27, 2014.

  1. #1
    I'm creating a vine website on Wordpress but I don't understand how do I implement the vines on my website without any plugin.

    As far as I know they don't provide API at the moment for anything.

    I would like to create a function something like YouTube embed videos.

    I've saw in many theme they provide a custom filed area where we put the YouTube video id and it will fetch the video in the post and also get the featured image of that video.

    Can anyone help me with this function for vine?

    In the link below this guy created all the functions I think which I needed for my theme but I don't understand how do I implement this on my theme.
    http://wordpress.stackexchange.com/questions/129156/send-and-embed-vine-in-wp-post-on-facebook

    I know the functions he shared will go in functions.php but how do I call this functions?

    I've found another source for featured image maybe these can help us a little bit.
    https://halgatewood.com/php-get-vine-app-video-thumbnail/
     
    ibadullah, Jan 27, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    The first link you provided gives you exactly what you want - you add the code there to your functions.php file, and then use a shortcode in your posts to add the video.
    What don't you understand?
     
    PoPSiCLe, Jan 27, 2014 IP
  3. ibadullah

    ibadullah Active Member

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    63
    #3
    Fatal error: Call to undefined function postShareBtn() in /home/hilariou/public_html/wp-content/themes/vinebox/functions.php on line 204

    When I paste the function I got the above error.
    I've removed the postShareBtn() from the concatenation.

    The half of the function is working now but still the video is not showing.
     
    ibadullah, Jan 27, 2014 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    PoPSiCLe, Jan 27, 2014 IP
  5. ibadullah

    ibadullah Active Member

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    63
    #5
    No friend still video is now showing :/
     
    ibadullah, Jan 27, 2014 IP