UPDATE: 12/01/2016:
We had a plan to launch the new updated script on Cyber Monday, but due to some technical problems with our hosting, we had to delay it for a couple of days more. In the meantime we are working hard on the new version of the script! It will be launched by the end of this week, with a lot of new features! Stay tuned!
—
UPDATE: 11/25/2016:
The new and improved Facebook Voting Live Stream application is ready and will be launched on Black Friday (today)!
Be the first to test it: SUBSCRIBE to the email list in the right sidebar and we will send you a coupon code for a HUGE discount!
—
UPDATE: 11/14/2016:
You can expect a new and improved Facebook Voting Live Stream application very soon! We are working on it! Be the first to test – SUBSCRIBE to the email list in the right sidebar!
—
Yesterday I’ve seen a forum thread that points to some guys who made millions of Facebook likes and views in matter of 5-6 hours (screenshot taken a bit late).
So, I decided to replicate the method. You will get the complete spoon-fed method and source code with a live counter that’s going to count the real number of votes. I replicated this method like 12 hours ago, after a sleepless night and I’m releasing it right after I got up.
I’m not selling anything. Just decided to give back to the IM community. Feel free to share/like/comment if you like what you read.
There’s one more day before elections are over, so try to squeeze the more you can out of this method. Once again, KUDOS to the original method creator! They truly are pure genius!
[wp-review id=”2261″]
Step by step guide:
What those guys did is an amazing job! They created a viral video of live voting on Facebook. A like is a vote for Hillary. A love is a vote for Trump. They took of in matter of hours (5-6 hours for 300k likes and 10M views). What they did is amazing! Never seen anything more creative in Internet Marketing business!
Prerequisites:
You will need a Facebook page, a domain with hosting, this Facebook post counter HTML/JS code (posted below), a Windows/Mac PC (or a VPS), OBS Studio (a free streaming PC application) and OBS Studio Browser plugin (browser streaming plugin to stream the voting counter – works only with PC/Mac).
Basics:
Due to very high reach of Facebook Live streams, we will create a Facebook live stream of a voting process with a real-time counter of likes/loves. The counter is basically a web page with an mp4 background and Facebook Javascript API counter of the likes/loves of the live stream post.
Let’s create a Live stream.
Since you already have a Facebook Page you are going to promote, click on Publishing Tools on your page.
Go Live!
1. Click on Videos.
2. Click on Live
Create live video
3. This is your streaming key that you will enter into OBS Studio software to be able to stream. Copy it. You will need it in the next step.
Create live video title and tags
4. Come up with a title that describes the live video
5. Add some tags. You could use those from the sample image.
6. Stream key once again (it’s the same key like on the previous image).
OBS Studio
7. Click on File – Settings – Stream: paste the key from Facebook that you previously copied.
Browser Source Plugin
8. You can find the OBS Browser Source plugin here. Add BrowserSource to Sources in OBS and type in the URL you will use to stream the voting. What you need to do is basically to host the source code that I posted below and put the url here. That means you need a domain name. If your domain name is: mydomain.com you could host this code in a directory, so the URL to it will be: http://www.mydomain.com/live/ (for example). You need to type that URL here. Continue with the steps and you will get the explanation of how to use the code.
Presidential Elections 2016 voting stream
How will the stream look like!
Some streaming tweaks
Facebook Live streaming limits are 720p in 30fps. Feel free to use 2000kB/s bitrate (or even lower) and 1280×720 resolution. Audio bit rate should not go above 128kB/s.
Voting app
Now let’s get to some real stuff! This is the most important part here!
In order to be able to use voting counter, create a Facebook application and host this code somewhere (code locked, please share to unlock):
- Please help us by sharing our content to others! Every share means a lot! Thank you!
The ZIP file above contains an MP4 loop background (American Flag waiving), 2 images of Hillary and Trump and index.html file. index.html is basically just a HTML/CSS layout and Java Script functions to fetch the like/love counter and increment it. Javascript is one Facebook javascript API request to fetch the number of likes/loves on the original FB Live stream post, and one js function to display it below presidential candidates + the incrementation function (the counter).
Creating a Facebook page application:
App Dashboard step 1
App ID and App Secret that you need to replace in index.html
App Dashboard step 2
Add your domains here so the javascript API requests could be whitelisted. If not, your domain will not be able to fetch the counter changes.
App Dashboard step 3
You need to make the application public!!! Don’t forget this step, otherwise the live counter wouldn’t work.
Source code modifications:
In order to make the source code working, opet index.html in a text editor and replace {post_id_goes_here} with your post id (it is a combination of page id and post id, separated with underscore), and {application_access_token_goes_here} with app token (it is a combination of page id and access token). Both variable should not contain {} curly brackets.
{post_id_goes_here} = id of the Live Streaming post
The counter request is basically this line of code:
https://graph.facebook.com/v2.8/?ids={post_id_goes_here}&fields=reactions.type(LIKE).limit(0).summary(total_count).as(reactions_like),reactions.type(LOVE).limit(0).summary(total_count).as(reactions_love)&access_token={application_access_token_goes_here}
Too speed up the process, you can use Facebook Graph API Explorer and the exact Live Stream post URL in order to find those values: https://developers.facebook.com/tools/explorer/
Elections are ready to start!
This is how this viral post will look like at the end! You need to set up the counter by adding Live Stream post id to index.html and let the games begin! There’s incremental function added to the counter so the counter will count all the time. Real Votes are refreshed every 30 seconds and will replace the incremented votes.
Starting votes are inflated, to look more realistic. Feel free to replace classes class=”ch” and class=”ct” with any number you want. “function hilary” and “function trump” and incremental functions, so feel free to adjust them the way you like.
Important notices!
- Pin the Live Streaming post to the top of your Page!
- You need to go to other related groups/pages and post a link to your Live stream post in order to get traction.
- I would also recommend NOT to use continuous video on Facebook, since it will be removed after the streaming process is finished. In that case, your video will be stopped after 4 hours, so you need to make a post #2, but a good thing is that it will be recorded, and it will stay in the page as a post. Just create a new stream and add a like to it to the comments (pin it to the top).
- If you want to add music to it, just play some royalty free music in your favourite music player. You need to add credits to the original authors of the music. These are some examples, but you can Google your own:
http://www.bensound.com/royalty-free-music/2
http://www.purple-planet.com/
https://www.audioblocks.com/royalty-free-audio/music
For setting that up, you will need like an hour, so it’s better to hurry up and see what could you get for the time until the actual elections. I’m curious to see what numbers did you make (reactions/views) in total, so feel free to post them below. Feel free to use the code for any other project.
I don’t need to suggest any monetization methods after you earn all the likes, since I’m sure you will come up with something. 🙂
Disclaimer notice:
Feel free to replace all the files in the subdirectories with your own ones, since only index.html is what is important! You can find only index.html source code above. I put the rest of the files to the ZIP to speed up the process of creation, since there’s not much time left. I did not add any code that does not belong there. I did NOT add any links to my sites. This method is 100% FREE and I don’t earn anything from it.
Thanks to the original creator of this method! He/she is a pure genius! If I was about to hire a PR company, they will be #1 on my list! Kudos to them! Also thanks to a friend that spend couple of hours on getting the code and setting up the counter fetching application.
If you like the method, feel free to share/like/comment! Thanks!
Also, please let me know in the comments where or how you found this page. I appreciate it!
Update on 08/11/2016:
This is an example of what one of my new friends from Denmark achieved on the election day, on 20k followers page that was not used in 3 years, in only 4 hours today (that’s the maximum length of Facebook non-continuous video). Looks like Facebook Live Stream has incredible reach, indeed! Good luck and be persistent with this method, it will pay off! Thanks for sharing!
Update on 11/10/2016:
Some more success shared by new friends:
302,000 reactions and 3,200 concurent viewers.
Stats translated:
- Top people seeing the live at the same time
- Shown minutes
- Unique people
- Videoviewes
- 10-seconds plays
Around 90k likes on that post.
Update on 11/11/2016:
Since there were a lot of people who do not know how to install the script, despite all the instructions, I was thinking about to start offering installations for donation, since I can not manage to help everybody.
I’m still not sure about it. Let me know in the comments what do you think.
Update on 11/15/2016:
Here’s an explanation how to set up your Facebook access tokens:
https://smashballoon.com/custom-facebook-feed/access-token/
A tutorial to get your post id:
https://whatswp.com/get-facebook-id/
If you like the method, feel free to share/like/comment! Thanks!
Please let me know in the comments where or how you found this page, since Google Analytics is not of a big help. I appreciate it!
Update on 11/14/2016:
—
An explanation how to set up Facebook access token has been added to the updates at the bottom of the post.
Update on 11/10/2016:
—
Since there were a lot of people who do not know how to install the script, despite all the instructions, I was thinking about to start offering installations for donation, since I can not physically manage to help everybody at the same time.
I do not want to set up a fixed price, since somebody’s $10 could mean a weekly salary, so you decide how much is it worth. I love to help and the whole method is for free, but to be straight honest, I can not afford to spend all my time for free due to a lot of other projects I’m working on (you will find out more about it soon here!), I will let you decide about the price.
Still not sure about it, so let me know in the comments what do you think.
Update on 11/08/2016:
—
Hello everyone! Due to a huge response from the community, looks like my BHW thread was moved to Jr Vip section. I was not aware of it. In any case, for all those who wanted to have the method online, I decided to publish the post here, as well.
There’s couple of more things I did not explain about the incremental function for all those who are not familiar with JavaScript, since I was in such a rush to launch it public asap.
Basically, the incremental function works this way (maybe timings are changed a bit):
Due to facebook api limits, the real vote counter is fetched every 30 seconds. The incrementation will inflate those values by 1 (+1) every 5 to 25 seconds using the JS.
After 30 seconds, the real values will replace the webpage counter. Once you catch up with natural growth of likes/loves, you will not have any decreasing values. That’s pretty much it.
Since this method is not related to elections only, you can use it for pretty much anything (cats/dogs, cars… you name it).
Thank you very much for your interest and please feel free to contact me in case you need any help. I’ll be glad to be there!
Hi sir. My desktop doesn’t work with with OBS.
I will try it with VPS. Can you give a recommendation what VPS works properly with this method?
Thank you.
Hello! I can’t suggest and specific VPS which would work correctly with OBS, since I’m using a desktop PC for streaming. But I suppose any VPS with 2-4 cores will be enough to run the encoding (depending on what you play). You could go with Amazon and test the VPS you need (by scaling it up or down), since they are one of very few providers that will charge you per hour. I will add a list of more VPS providers to the post #2 during the day, so stay tuned.
Ok sir.
Oh one more question for the last.
If we will use this method, do we must use high-speed internet connection for streaming OBS?
Thank you.
Hello! Recommended bitrate for internet HD video is 2Mbps, so Real Player and dialup upload speed get along well with 720p streams.
Oh no sir…
The OBS needs GPU for working properly, but many VPS/RDP don’t have it. What I should dp now? My Desktop has GPU it is too old for doing OBS.
Any solution, mate? 🙁
Hello! An obvious solution is to update your PC. How about renting a cheap dedicated server? Something like i3/i5/i7, that has Intel HD GPU with QuickSync? You can look for some promos. There’s a lot of very affordable hosting providers.
I borrowed desktop from one of my best friends last night and it works! But his internet connection was not fast enough to stream the voting video although I have changed the video with the image. So the video-stream has lagged often.
Can you give us any recommendations about dedicated server that works fine with OBS, sir? It will be useful information related to this method.
Hello Dondon! I do not have any recommendations which host will be a compromise of price and performance, but you could always try Amazon. At least they charge by hour. A potential problem is that Windows license is usually issued per month. I will do some tests and will publish my findings soon.
Hello mate,
I’ve already gotten it to work and the truth is perfect, as I said before the only problem is that I do not want to make increases or do not make them so great, yesterday I made a publication I got about 700 likes and 500 love, then With this method of increments makes too many big jumps since I move in small numbers.
How and where do I edit to lower that range? Yes, I read the comment before asking, but I still have no ideas, I have very limited programming knowledge.
Thank you very much again
Please consult somebody who is familiar with HTML/JS, it will be couple of minutes edit. Or you could donate for help and I will do it. Please don’t get me wrong, I’m not greedy here, but I can not afford to spend any more time on tweaking the script the way everybody demands. Thank you for your understanding!
Hi, I need your help! It doesn’t count anymore, I mean never
I’ll send also a donation of course!
Hello GianMario! Thank you for your visit! Can you please send me your contacts using the contact form on the website? Thanks!
Visitor Rating: 5 Stars
Visitor Rating: 1 Stars
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
Hello mate,
Thank you very much for the guide, I followed it perfectly to 100%, the problem comes in the section “Source code modifications”
The truth is that I do not know if I have to put the “APP ID” the “APP Secret” or what code is what I have to put, besides I have to replace it with “{application_access_token_goes_here}”?
Also in {post_id_goes_here} = id of the Live Streaming post, then, where do I get the ID of the Live Streaming post?
Sorry to be so clumsy, the rest is all set up perfect.
Thank you very much and greetings!
post_id is a combination of pageid and postnumber (pageid_postnumber).
If your example post is
https://www.facebook.com/MatthewWoodward.co.uk/posts/1364637276882896
, we will generate the post_id out of it. Go to http://findmyfbid.com/ and type in the page URLhttps://www.facebook.com/MatthewWoodward.co.uk/
. You will get the page ID: 366576380022329. To generate the post_id, we will combine it with the post number, so the post_id you need to type into index.htmlFinally your {post_id_goes_here} will be: 366576380022329_1364637276882896
Don’t forget to remove the curly braces {} !
About the {application_access_token_goes_here}, you need to copy the result found here: https://developers.facebook.com/tools/accesstoken/
Again, don’t forget to remove the curly braces.
Hope that helps!
Hello Bratza,
I have followed your steps carefully but the counter still does not work, I explain what I have done:
I’ve gone to the web to find out the ID of my fanpage.
I created the streaming post on Facebook to get the post ID.
Then I created the pageid_postnumber code and in index.html I replaced it with {post_id_goes_here} also deleting the braces {}.
I then accessed https://developers.facebook.com/tools/accesstoken/ and got the access token of the application we created to perform this streaming.
The access token has been replaced in index.html by {application_access_token_goes_here} also by deleting the braces {}.
Then I have saved the index.html and started interacting with the post: I like and I love it, and after waiting more than 30 seconds the counter still does not work.
Add that:
· I added the domain where I live the “live” in the facebook app to add it in the whitelist
· The APP is in “public” mode
· The streaming key of facebook is correctly in OBS
· When I interact in the streaming “Like” and “Love” appear for the image
· In the data panel of Facebook I count the “like” and “love” but I do not count them in the script
Sorry to bother you again, but I’m very close to getting it but something fails, if you need more data (pageid_postnumber / accestoken) leave me your email.
Thank you very much!
Please include your copy of your index.html on Gist (for example) and send me the URL using the contact form. I will do my best to fix it and email it back to you. Thanks!
Done!
Hi mate, check mail pls
Thx
“Error validating access token: Session has expired on Wednesday, 09-Nov-16 11:00:00 PST. The current time is Thursday, 10-Nov-16 05:22:48 PST.”
You need to use a valid access token. https://developers.facebook.com/tools/accesstoken/
I got the same problem as @xuse92.
And you have not writed where I need to write the APP ID on index.html
You got the answer above. Let me know here if that helps.
Access Code is a combination of app and site. https://developers.facebook.com/tools/explorer/
Exactly. The access token is listed here: https://developers.facebook.com/tools/accesstoken/
Copy/paste it to index.html API request URL, just replace {application_access_token_goes_here} (don’t forget to remove the curly brackets {} ).
Where i have to put the APP_IP and APP_SECRET ?
You have been lazy! 🙂
Please read the rest of the comments.
Hello,
I have the same question, how dit you solved this?
please help me, Thanks!!
Just browse thru the comments section. There’s very detailed explanation there.
i dont know why i doesnt work with my APP, i just did all steps.
{
“741862065963861”: {
“reactions_like”: {
“data”: [
],
“summary”: {
“total_count”: 2
}
},
“reactions_love”: {
“data”: [
],
“summary”: {
“total_count”: 1
}
},
“id”: “741862065963861”
}
}
You are getting the correct JSON reply from the Facebook API. You probably forgot to set up the application type to Website, in Settings-Basic in the Application Dashboard (+Add Platform at the bottom). Also make sure that “Native or desktop app?” in Advanced Settings is disabled.
Let me know if that helps.
i follow the steps with (natvie or desktop), the webseite platform i already add.
do u have Teamviever ?
I don’t mean to sound rude, but sorry, I shared more than enough info here, probably more than anybody ever will. If you do not know how to set up a Facebook app, then either talk to somebody experienced or learn how to use Google. You will thank me later.
I am also getting same output. tell me one thing how to get Post id. because streaming is video so we have to use video id
Just added an update to the end of the post below the token access tutorial. Please check out above.
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
Can someone please share the URL address of the page where they found a link to this tutorial? I wanted to thank those who shared it.
i found it on google, i also share it to facebook 🙂
Just google has brought me here and i am enormously grateful
Thank you visiting my blog and for sharing the post! I appreciate it!
I saw the link in this comment below a YouTube video:
https://www.youtube.com/watch?v=OqPnau9i0V0&lc=z13nitzqip2gzlorg04cfbozixfsubwjy50
Thanks for sharing! Much appreciated!
Japanese come from this site.
http://smarvee.com/column/how-to-facebook-live-poll/
Hello! Thank you very much for translating the article and for the backlink! I really appreciate it! Keep up the good work! 🙂
Hey, i followed the tutorial step by step, i got the stream working, but the numbers dont start counting, its just the static numbers. do you know what might be the problem? Thanks for all the tutorial by the way.
Are you getting the correct JSON reply when you run that API URL (with the post_id and access token) in your browser? If yes, then check out the other settings for the app (the whitelisted domains or Application Platform in App Dashboard Settings). Please read the rest of the comments to get more info. If everything is set up correctly, then everything should work fine, since the code is correct and was tested couple of times.
When you finally load index.html in your browser, wait for the first fetching of data. It will be triggered after initial 30 seconds and will replace the output on the web page. Let me know how it went!
Setting up this app should not be a problem if you have any experience with FB apps. 90% of people who faced any problems had them due to a very poor Facebook documentation about API or or setting up an App.
Can you please let me know where have you found a link to this page? Thanks!
I search on google for Facebook Live Vote and than add the filter When “This Week” and clicked on section “images” and i found your website.
Thank you!
I got it working lol it was a really child mistake, a missing ” ‘ “. is there any way to only chang the numbers to the real time? i dont mind if it only change every 30 seconds
Please read the rest of the comments. Thank you!
I add the domains, i make the app public, i add an website (Add Plattform) i also deactiveted the (Native or Desktop).
Are there any other steps ?
https://graph.facebook.com/v2.8/?ids=724806801002721_741862065963861&fields=reactions.type(LIKE).limit(0).summary(total_count).as(reactions_like),reactions.type(LOVE).limit(0).summary(total_count).as(reactions_love)&access_token=EAAUK1xh41hcBAMglSZB6YBaauVjceaIzV44RrfkUGZCjZCOH2XZC42HWZCk887HTIoF9GXORqZAedNHmSEF8EqL06z4fareLNEZB7Q5zGOVVasQOVjv0UPOErtxREaMAnJZBCENdW51bTQMVdCevyPR8M6yFIs4AsgcFchdUByUJbQZDZD
The Json works and the App should also work.
Looks like yours is working, can you send me your files and screen shots of Facebook app to compare with mine?
What I can see, everything is working just fine.
I would advise you to change the initial (inflated) counter values back to 0, since obviously this is what is bothering you, both in HTML and Javascript part.
You need to wait for 30 seconds until the initial counter gets fetched for the 1st time. Hope that helps!
Please use the contact form to send me more info about the Google keywords that you used to find my site.
thank you 🙂
Hi terkon1995. Can you send me the URL of your code index.html to compare with mine? I don´t know why my app don’t run. Thank you
Please do not share the code here, since it is included in the post which is locked for social shares (really means a lot to spread the word). Please use the contact form and send me (for example Gist URL) your index.html. I would try to fix it for you. Thank you!
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
Hello, I followed the tutorial but something went wrong for me. I set up everything like you said but it didn’t count.
https://postimg.org/image/o45nch9nt/
This is index.https://postimg.org/image/qqsf4d581/
– This is facebook app (i also made it public)* URL censored *
– this is where i uploaded the scriptWhat i am missing ?
There’s a problem that most of the guys did. getJSON function is written bad. There’s a return (or space) at the end of the API url. Facebook API URL should be closed with apostrophes. Plus your token has expired. Open that URL into your browser and you will see the JSON reply from the Facebook API. Once you get the correct results for each like/love, your counter will be working correctly. Let me know how it went!
Thx dude, your’re amazing. such an easy fix.
How to fis acc token becuase not working.
Please read the rest of the comments. There’s an explanation how to do it. And don’t forget ‘ (apostrophe) at the end of the URL in index.html
Let me know how it worked.
Hi,
I’m already trying hours to get the counter to work. The livestream is working perfect, I also uploaded the zip file to a server and get the script working, But the counter don’t work if somebody gives it a like or love emoticon. I read al the steps one by one for hours.. what do i wrong? Please help me.
Regards,
Sam
Hello Sam! Please send me the copy of your index.html on Gist using the contact form on the website. I would try to help. You can also try to read the rest of the comments, since there’s detailed explanations that might help.
Hi,
I have send you a email.. please help me i’m so close..
Regards,
Sam
There’s some twists I figured out within last couple of days. There’s a lot of other usage for this app that did not come to my mind until I get replies from you guys. I will write a new (additional) post that will complement the tutorial nicely, like new examples of usage, screenshots, places to find photos/videos, etc…
Hello Friend! Firstly, I wanted to thank you for the great tutorial.
And I’d like your help to make the live run on my page. I’ve done the tutorial 3 times and I could not.
The link with the counter is this
*URL censored*
The page I’m using is this
*URL censored*
Link with the code: *URL censored*
I sincerely hope you can help me! Many thanks and congratulations again
Close the https url with an apostrophe.
Thank you Bratza for this awesome method not all are so kind
i am a bit stuck
i read your article + comments over 10 times but still i dont see counter to increasing
the GetJSON is workin fine tho here’s a screenshot i “loved” the livestream from another profile
http://prntscr.com/d58iq9
but on the website/livestream i do not see it increasing
so here are my app’s settings screenshots :
on Advanced the Native or desktop app?
is disabled http://prntscr.com/d58k3y
On settings/Basic
i added as platform>website and url
added app domains both the www & non www (without the http://” just like in your guide
http://prntscr.com/d58mt4
between
the live video is hosted on a subpage domain.com/live
not on domain.com
what am i doing wrong ?
as long as i see that my counter works at GetJSON why it’s not updating ?
any help would be greatly appreciated
Best Regards!
Can you please copy your index.html code, upload it to Gist.com (or any other code sharing site) and send the link using the contact form? I would be glad to check it out and try to fix it in the morning.
Hello friend. Im stuck in this tutorial. Maybe you can help me. I did all the steps, but i dont know what do i do with the modified index. Where do i upload it. Thank you
Nevermind, i figured it out. But i still dont know, and i read this 1.000 times, where do i use App Id and Ip Secret codes. I spent 4 hrs reading this tutorial from A to Z, but still couldnt find an solution. Cheers !
Do you know how to set up a website? If you have a website that is working, just create a directory, upload the files there and then open that URL in your OBS browser. About the ids/token, check out other comments, you will find an answer there.
Hi, will somebody help me?
http://prntscr.com/d5ilu5
I did right
You forgot the apostrophe after the url.
Where you make the mistake
isn’t automatic like
http://prntscr.com/d5jnno error
http://prntscr.com/d5joyt no like ++ .?
http://prntscr.com/d5jp7e html code
You are missing the apostrophe at the end of the URL, as well. Please read the rest of the comments for the explanation.
http://prntscr.com/d5kmuq
Have I told you…?
The closing apostrophe is in the wrong place. It should be in front of that coma:
‘,function…
Problems have put my web application… why?? the page is *URL CENSORED*
Please read the tutorial once again. You did not remove the curly braces {} around post_id and access_token. That URL should be within apostrophes.
Hi Bratza. you did a great job. but can you make the section “Source code modifications” more clear. i think many of us stuck in this part, because its confusing. i really appreciate if you can edit it so we can understand. i read the comments and still stuck. hope it will work in the end. thank you 🙂
Hello Ozbek! There’s already an explanation of the code modifications that should be done. All you have to do is to add your post_id of the Live Stream post and your access_token. That’s all. I already explained in a comment above what exactly should be done. You can even find somebody else’s example in the comments. If there’s anything that still bothers you, just let me know. You could also google for Facebook Javascript API documentation and maybe look for examples on Stack Overflow.
Hello.
Thank you very much for the guide,
I have done all steps but counter not working. Counter freezed on 41125 and 398221 votes.
I think that i need modify something like: 411251 ( in index html )
and replace “411251” with peace of code/script to start counting likes.
Probably it could be another error in my settining like access token generating.
My steps:
$.getJSON ( i have token from https://developers.facebook.com/tools/accesstoken/ ) it is something like “xxxxxxxxxxx|m6U_xxxxxxxxx”
And I have generated pageid_postid and replaced it in index.html
1) First i generate page id from page url.
2) Then I generate post id from post url.
3) combine 1pageid_2postid
I think it is correctly. Then i download “live” folder to my hosting and test it.
But counter is freezed.
The counter should be working fine if your API request (that getJSON URL) returns correct JSON data (correct like/love People either enter wrong post_id_ and/or access_token, or forget to close the API URL with an apostrophe. There’s two places in the code where the counter is inflated: one in the HTML part and the other one in the Javascript part, where it is incremented by some value (I don’t have original index.html here, I’m on the phone).
Success 🙂
Thank you very much!
Hei…how can i make post id from post url? What post url??? Thank you
The post URL is a web address of your Live Stream post. There is an explanation in the comments above.
Visitor Rating: 5 Stars
hi bro help me please i follow step by step but! not working help me please
(*URL censored*)
You did what most guys did, you did not finish the API URL with an apostrophe. That https url MUST BE within apostrophes.
HELLO
Where do i put the APP ID and APP SECRET ?
Hello! Did you read the tutorial? There is a section “Source code modifications” and you will find your answer there. There’s also more information in the comments.
Hi, first many thx for this nice work, man! Do you or somebody have any idea why the Background Video on Browser is working but not in OBS Studio when add it over Browser Source?
Hello Drekken! Check out my other post here and you will find the solution: https://www.bratza.com/facebook-voting-app-part-2/
There is a workaround for the background video that is not working on Mac (I suppose you are using a Mac). I think this problem is related to Safari, since OBS is probably using Safari engine. This workaround will solve your problem.
Perfect! Works! Many thx for quick response!
I double checked everything and read all solutions in the comments. But I still can’t get it to work. I sent you a message via the contact form, including a Gist link. I probably make some very stupid mistake…. But I can’t figure out what it is.
Never mind. I missed a comma somewhere earlier in my own changes in the code. Works perfectly now!
Hi.
I do exactly you write in this article and read all comment bellow.But it still not working.
I check back step by step I do and all fine, but it not counting>
– Make facebook app and check setting is ok
+ Public app : OK
+ Add domain : OK
– Edit index.html :
+ Get fanpage id and post id :and paste it to {post_id_goes_here} : OK
+ Get app token via your url you posted in comment and paste it 3 times (post_id_goes_here) : OK
– Live stream : all ok
I checked with facebook graph url : OK
It show like this :
{
“490419404490433_587388918126814”: {
“reactions_like”: {
“data”: [
],
“summary”: {
“total_count”: 1
}
},
“reactions_love”: {
“data”: [
],
“summary”: {
“total_count”: 0
}
},
“id”: “490419404490433_587388918126814”
}
}
Please help me
Hello! You probably forgot to close the URL with an apostrophe. Please read the rest of the comments for explanation, and let us know how it went.
Hi bratza
I added apostrophe to close the URL :
My code after edit :
$.getJSON(‘https://graph.facebook.com/v2.8/?ids=idfanpage_idpost&fields=reactions.type(LIKE).limit(0).summary(total_count).as(reactions_like),reactions.type(LOVE).limit(0).summary(total_count).as(reactions_love)&access_token=app-id(get from url above)’,function(res){…..
But it still not working.
Can you help me please.
Run that URL in your browser. If you are getting a correct JSON output with the right like/love count, then everything is fine. If not, you will see an error in the JSON reply and will know more about the problem. It’s usually invalid or expired token.
When I run facebook graph url in source, it ok, counter working. But it not showing on the facebook live 🙁
Please provide more details, since there could be more reasons for such a problem, starting from the wrong Facebook Live secret key you type in to OBS, up to a bad internet connection.
Thanks, finally , it working after many time to edit code of source when read comment bellow
I’m glad it working! Let us know how it went! I hope you had success!
Just simple, Read comment above and bellow will found how to resolve the problem
Where can I make a mistake thank
(*URL CENSORED*)
Feel free to make it anywhere. 🙂 Joking aside, please read the comments and look for the “apostrophe” problem.
it’s been 7hrs now and still nothing the counter doesn’t work
i’ve done every step and read this tutorial completely more then 10 times
i didn’t forget to add aposthrophes at the end of every url
and didn’t forget to delete the curly braces.
Please help
Hello.
There is a little problem. Likes jumping for example from 5 to 30. I have only 3 likes and 2 hearts. But it shown for example 135 then again 30, 40, 55 or 267… Infinite jumping.
But really I have not get more than 5 likes.
APP counting it correctly ( 3 likes and 2 hearts ) but counter in page jumping between random digits.
As already mentioned in the previous comments, there are 2 places in the code that set the inflated counter: one in the HTML and the other one at the beginning of the incrementing function in the Javascript. Please read the rest of the comments, there’s an answer there.
How do I add more reaction to those who would write and count?
Hello! Check out this document. https://developers.facebook.com/docs/graph-api/reference/post/reactions
Potential variables are: NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL
Thanks! Works great!
Hey there! I’m glad everything is working! Good luck and let us know how it went! I would be glad to post your success story here!
I doubled the number of people reached within 2-3 days. 1 million to 2 million. Unfortunately, there is no great solution but it is a nice result, for the time being.
Hello! I’m glad you had success with this method! That’s what it was all about! 🙂 Would you like to share your success story in an update to the blog post? We could remove any personal info. Thanks!
I can do that is printed to the comments, for example. as scrolling text at the bottom? 🙂
Hello again! I’m afraid I was not able to understand your question.
Hi
I’m having problems adding app domains :
App domains must match the domain of the Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct these domains:
What i need to do ?
Thanks
Did you add the Website platform? If not, do the following:
1 – Click Apps and then select your app.
2 – Click the Settings button on the left side of the screen.
3 – In the Basic settings, click the Add Platform button below the settings configuration.
4 – Select Website in the platform dialog.
5 – Enter your URL (localhost works here).
6 – In the App Domains text input, add your domain that matches the one in the URL.
7 – Save your settings.
Im sorry to bother you again. Im so close of finishing this tutorial, but im stuck at a point…more points, to be honnest.
1.If im not asking you to much, could you send me the correct index file… i simply dont know where to put de “‘” apostrophe(s). Im not familiar with the html ecoding, but i can replicate it pretty well. this is my email [email protected]
2. Where do i put the App ID and App Secret codes from “developer” . Do i use them to generate the post id? or something else?
3. How do i generate the post id? I found out the page_id, that was simple…but i dont know how to generate the post number id…is it related to the Facebook Streaming code? or the APP ID/App Secret Code? It’s a mistery to me 🙂
I will forever be gracefull if you take a few minutes to answer me. Think of me as a dummy 😀 Although im pretty smart outside html 🙂 Thank you.
And to answer how did i get to your tutorial… from Unilad Youtube page…on the election vote, somebody put a link to this website 🙂
Hello Cristi!
1. You should have received the corrected index.html by now
2. There’s a detailed explanation in the comments. Please do not be lazy and do browse thru the comment section. You will figure it out on your own. If not, please contact somebody familiar with setting up a Facebook app.
3. This is some basic stuff explained in almost any tutorial that’s about setting up a FB app, so please do your homework or hire somebody to do it for you.
Hi bratza, thank you for the tutorial.
Understood about this article article from the BHF.
Do you have clue why when I am live for about an hour and everything is going fine my live is stopping. Do you think it is internet connection problem? My connection is 30mbps.
Also how to make real results, because with default code the numbers are moving too much?
You can turn off the incremental javascript. Please don’t ask me how, since I won’t have access to a PC for a day or so (on the road).
Hello Emkal! Thanks for visiting the website! Looks like there’s a weird problem with Facebook Live Stream platform. I had problems with streaming non-continuous streams. Almost all the time the streaming stopped around 30 minutes time (29 min, 31 min, 30 min). Since this video is recorded and will be available after the streaming, I suspect that this is some sort of a limit that is based on your country or maybe some other settings based on the user’s behaviour (level of trust?). It’s just a guess, since it’s very unusual to always get the stream disconnected around the same time. You might like to experiment with changing page physical address (in page About) to some other country or try to use a VPN to stream from some other country. Just to let you know that this problem never happens with the continuous streams. The only downside of having a continuous stream is that after 7 days the post will expire and will probably disappear. I personally never got to that point, it’s based only on the logic.
Hello mate,
I finally got it, but the counter does not work as it should, that is, it does not show me the actual “like” or “love” total.
In Facebook publication do not stop adding and subtracting on both sides, and if I check it in the url address of https: //graph.facebook.com/v2.8/? Ids = … the numbers are other, totally Different.
How can I get them to show me the actual data?
Thank you!
Please check out the tutorial once again. There’s an explanation about the incremental function. You need to remove initial “inflated” counter, both in the HTML and JS code (2 places to check).
Hi mate,
I replace:
0
0
And:
th.text(0 + res[‘x_x’].reactions_love.summary.total_count);
hh.text(0 + res[‘x_x’].reactions_like.summary.total_count);
Even though the counted works poorly, add and subtract what you want, follow the truth a little bit but do strange things.
Thx
Hello again Xuse. The counter is not acting strange. Did you read my first comment right below the tutorial?
It is acting exactly the way it was intended. Please feel free to make any modifications that suit your needs.
Hi
The dropbox link isnt working anymore (too much traffic..)
can you provide a new link please..?
and is it possible to add more emojireactions.. also the wow effect, so we people have 3 choices..?
Link updated. Thanks!
Good evening
Please give me the link to download the source
*DROPBOX LINK HERE*
This url does not work
Error (429)
This account’s links are generating too much traffic and have been temporarily disabled!
thankyou
Thanks for pointing out! The Dropbox link has been replaced with a Google Drive link. Please check out the links again.
All those comments with too simple questions such as correcting the JS/HTML are making me frustrated. Don’t get me wrong, I appreciate your visits, but my time is not for free. Let me explain:
I have spent more than 12 hours developing the method, another 6 hours writing the tutorial, more than 6 hours on replying to the comments. So, more than 24 working hours spend in total, all for free, and somebody is too lazy to read the tutorial or the comments completely.
If you ask me, it’s been a bit rude if they expect me to really spoon-feed them and teach them the basic stuff. There’s much more information shared in this tutorial than most will ever reveal. There’s numerous HTML and Javascript manuals online, there’s also Facebook API documentation available (I know it’s shitty, but I had to go thru it), so please check them out first. This tutorial might be a bit confusing, but if you still don’t know how to implement this simple script, please either learn it, consult somebody experienced with HTML/JS and/or Facebook API, or quit it.
For all the new questions: I’m not going to reply to any new comments related to correcting the JS syntax or HTML editing. Please read the comments section instead, since everything has been already explained there.
If you have any other questions other then fixing the getJSON JS syntax or getting the post_id/secret_token, please feel free to ask them. I would be more than glad to address them.
I appreciate your visit! Please appreciate my time! Thank you for your understanding! Good luck with the method!
I can understand how much pressure you are under,but look at this side, your practically the only one with a guide (and a great one) on the internet, about this, so i think you have done a great job and i think many will follow you in the future, i know i will!!.
Hello Denjo! I really appreciate it! To be honest, since I was not expecting such an interest, I did not set up any social network accounts! 🙂
I was actually about to create FB and Twitter profiles and will update you soon. Thank you once again!
oops…
“Error (429)
This account’s links are generating too much traffic and have been temporarily disabled!”
at *DROPBOX LINK HERE*
oops… I saw that you already upload a new link… Could you, please, delete my comment? Thanks, and sorry about this… 😉
Hey, no worries! Let us know how it went! Hope you had some success!
The link was updated. Please refresh the page and let me know if you have any problems with the new Google Drive link.
Hi,
I have followed the guide and i am almost in goal.
My problem is that Likes and Love reaction is counting with no regards for if people are hitting like or Love. Both numbers are constantly ( not every 30 seconds) going up and down, and there is no logic in why they are doing it. Even after i shut down the stream and disconnect from facebook, i can see its still counting, so the numbers have nothing to do with facebook.
I have read the guide and comments over and over, and i simply cant find any solution to that specific problem
I have made a gist of my source code, so you can see if there is anything wrong there: *GIST LINK WAS HERE*
Please read the first comment. There’s an explanation. If you don’t like the incremental function, feel free to delete it. It was actually very helpful, if you inflate the initial votes.
Visitor Rating: 5 Stars
Can you check mine please? What im doing wrong? *GIST URL REMOVED*
Thanks for visiting the website! Please look for the apostrophe fix in the comments above. You are missing the apostrophe right after the getJSON URL.
Hi got this if I put the URL into the web, but I couldn’t get the likes and loves in the Facebook Live Video. I have read this article and comments 10 times and I don’t know what is the mistake. Please, could you help me? THanks!
{
“817999835001457_919516761516430”: {
“reactions_like”: {
“data”: [
],
“summary”: {
“total_count”: 1
}
},
“reactions_love”: {
“data”: [
],
“summary”: {
“total_count”: 0
}
},
“id”: “817999835001457_919516761516430”
}
}
What is the problem exactly? I can see that you are getting good JSON reply from Facebook API. Did you forget to update the post_id to the output (2 ids in the next line of code right after getJSON request)?
No, I didn’t forget it. Perhaps the problem would be the random or strange valors in HTML and Javascript, but I don’t know what I must change it. Furthermore, if I open the URL where is the index.html I check is working but the live isn’t work. Could you help me? Thanks!
All I can say here is a blind guess, since I did not see your setup. I guess that OBS cache is still using the old version of your files. What I can suggest it to check out the rest of the comments, since somebody posted instructions how to do it, if I’m not wrong. If not, you could rename the directory from /live/ to anything else, and use that new URL in OBS Browser settings.
I know Bratza is busy so if anyone at all can help me, i’m at a complete loss. I have done everything correct to the best of my ability.
My URL for getJSON: http://prnt.sc/d5t0y8
if their is anything wrong with that please let me know. I cant get the counter to work but I’ve scanned this thread a bunch of times even with the additions of the new updates.
when copying URL into Facbook API tool I get this:
{
“error”: {
“message”: “(#100) Tried accessing nonexisting field (reactions) on node type (URL)”,
“type”: “OAuthException”,
“code”: 100,
“fbtrace_id”: “EIAZ7HqBk78”
}
}
Hello! You have probably messed up something with the post_id. Since I don’t know which getJSON code you used, I can’t help much. I would suggest to look for correcting the post_id first.
The syntax seems correct. What reply do you get when you enter that URL in your browser?
Hi Bratza!
I’m stucked at the url.
Do I have to purchase a new domain name to make this happen?
Thank You.
Actually to be straight honest, when creating the script, I was insisting on using Facebook Javascript API for this reason. So, technically, you don’t need any web server to run the script. If you can manage to set up the FB application to work on a localhost, that would be neat. There’s some tutorials online, so please check them out. Let us know how it went!
Hello,
I think I have configured everything correctly but the meter does not start.
*THE CODE WAS HERE*
The app id is create and active
I changer number 35 in code for start but don’t change automatically
35VOTES
Where is the problem ? Thanks you very much to help.
Good Bye
Cho
excuse me, change the ligne
th.text(0 + res[‘180906898703958_1034759176652055’].reactions_love.summary.total_count);
hh.text(0 + res[‘180906898703958_1034759176652055’].reactions_like.summary.total_count);
No start the counter..
Thanks you very much to help.
Good Bye
Cho
Hello Cho! According to your getJSON URL, your token is incorrect. I’m getting this error: “An access token is required to request this resource.”
You might like to use the correct token.
bratza, confusing is that in your guide:
—
“App Dashboard step 1
App ID and App Secret that you need to replace in index.html”
actually i cant find in index file where you put voting app secret. Yes you combine page id + stream id and access token, but you don’t need exactly those app id and secret.
Have you managed to download the ZIP file with the code? If yes, then go thru the index.html code and you will find a field named secret_token or access_token or something similar. Just replace it with your app token. Let me know how it went.
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
Visitor Rating: 2 Stars
Bratza – I’m WAY out of my depth here when it comes to the counter.
Can we pay you to do one for us?
Hello, there! Sure thing. Please reply to my email. Thanks!
BRATZA do you know how to change the counter interval ?
i wanna make it refresh the votes every 30 Secs
Hello Kaaris! The time is defined in the javascript code and it’s in ms. I believe that the initial value is 10 sec now (not 30 sec anymore, as I claimed previously). Please change the value of the timeout in js.
hi brats, thank to share!!
I have some problems, which file i need to upload in the directory? all live.zip? some file like composer,lock when i go to upload said me that is not possible upload that file… maybe i wrong where upload file…thanks
fHello Simino! Thank you for your visit! You need to extract all the files from the archive, then upload them not. Do not upload just the zip archive itself. I suppose you are bothered by a lousy HTML file manager from your hosting control panel, so I would advise you to upload your files directly using a FTP or SFTP, rather than using a web file manager.
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
I followed tutorial till the end everything goes smoothly
Except when we vote the commutator does not always work 0
It is possible to help me or I give you the source code
thanks
Hello! I’m afraid you are not very clear here. Did you want to turn off the incrementation? If yes, than you need to disable the incremental function in the code by replacing the code.
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
Thank you very much. i was looking for this awesome tutorial 🙂
Can you just please upgrade the javascript from two reactions (LIKE and LOVE) to 6 (LIKE, LOVE, WOW, HAHA, SAD, ANGRY)
I tried to add them but not succeed 🙁
you don’t need to change html and css. they should not be too difficult to me to customize :”>
It’s very easy to do. Just edit the getJSON url and javascript that prints out the results.
Yes getJSON was easy but I couldn’t figure javascript for printing them. counter remains at Zero 🙁
Are you sure you are using a valid token? Have you replaced the post_ids in the javascript below the getJSON url, so the script could print out the results?
I found where i mistook. (; changed to , in two lines)
Now it works with four reactions too 🙂
Hey there! I’m glad to hear that! Good luck with your voting stream! Hope you achieve success! Let us know how it went!
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
price? thank
Hello Baki! I’m afraid I do not understand your question.
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
Hello friend, once again. So i got al figured it out, with a little help from a friend that knows Java and HTML 🙂 but… there is a but… the counting is going well on my hosting, its well balanced with the facebook likes/hearts, i even deleted the random voting from begining…BUT the OBS studio does not show the changing of the votes that apear on my site, my hosting. Its mind blowing. So everything is going well on Facebook and on my hosting, but that god damn OBS Studio is trolling me. It’s streaming only the default votes, that i changed to zero in index, altough on the website the votes are changing acordin to Facebook likes and hearts. Can i use other streaming program? Must it be only OBS Studio? Cheers mate 🙂
Hey there Cristi! I’m glad to hear that! 🙂 You did your homework! Congratulations! You could use some other streaming software, but you would not be able to use that PC for anything else. The problem with OBS is that it has a browser cache which I can not figure out how to delete. What I would advise you is to change the URL you are using in OBS (just rename the directory on your hosting, from /live/ to something else). It should most definitely work. Let us know how it went.
can you help me ? plz
Hello! What can I do for you?
Just go %appdata%\obs-studio\plugin_config\browser… Delete all in it
Thanks a lot for sharing this info! I would include it in the post updates! I really appreciate it!
Visitor Rating: 5 Stars
Hi, I following the instruction but the counter doesn’t work.
Can I hire you for a video tutorial? I tried all combinations man:
idpage_idpost it’s simple, I can see in the urls
I tried all combinations of:
access token, user token and app token so I give up
Hello Marco! Thank you for visiting this blog and sharing a link to it! I have already sent you an email, so please provide me your Skype contacts there. Thanks!
Visitor Rating: 4 Stars
Hi Bratza,
Would it be possible for me to arrange a session with you over Skype for a tutorial over this? I’m quite a beginner in coding and JS and I’ve been working on this for 2 days but to no avail. I would be able to make a donation/ fee to have a session with you if its possible. Really hoping that this could work!
Hope to hear from you soon.
Hubert
Hello Hubert! I think I have already replied to your FB messages. If not, please use the contact form on this website and please send me your Skype contacts. Thanks!
Visitor Rating: 5 Stars
Hello there Bratza,
i have set all that u have said, dont know wheres i did mistake… everything works fine , video is showed like is need to be but likes na loves doesnt count…..
Is your getJSON request returning back correct data? If yes, then check out the apostrophe problem. Don’t forget to put the correct post_ids in the Javascript output (the code right after the getJSON url).
sorry this one is correct
* The is CODE REMOVED for privacy reasons *
Hello Toni! You forgot to close the getJSON url with an apostrophe. Check out other comments for instructions. Also, when I ran that url in browser, I got the following Facebook API reply: “Error validating access token: Session has expired on Saturday, 12-Nov-16 09:00:00 PST. The current time is Saturday, 12-Nov-16 11:58:30 PST.” You need to use a valid token.
Works amazingly. Tried on an absolutely new page, got some reach but nothing close to “viral”. Thanks for taking your time to write and support this.
Cheers!
Hello Clooc! Thank you for your comment! Is it possible that your post was not interesting enough to the mass society? Is it maybe some narrow niche? I suggest not to quit now, but to be persistent, until you figure out what will work. Most of the times it’s hit and miss. Also, do not forget to boost your post from any page with a lot of visitors (unfortunately, it’s not possible to boost a live stream post using FB ads). If you do not have initial “seeding” for the post to “stick” (to go viral), it’s hard to expect any decent results. You can check out other success stories in the comments above, or in the Updates section.
Yeah, the post was about pets – Cats vs Dogs. Well, today, I choosed to do something different and it worked waaay better than the first attempt.
As tomorrow we have elections here in my country (not US :D), I made a live like “Will you vote tomorrow? Like if Yes, Heart if No”. Then started posting in some broad groups using a fake profile. Right now, I have about 28.785 People Reached and 1.647 Reactions.
Seems like a good result, but i expected more reach. I also deleted the counter and video because the stream was getting buggy due to my low internets 🙂 Anyways, I hope that Facebook won’t ‘look into this’ for some time… I need to try it on other pages too. 🙂
Thanks!
Hello Clooc! Since there’s no options to boost live streams while they are live, you need to do some initial seeding. Like getting/buying a post on a page with a lot of followers that is active. You need to gain traction in order to get the viral effect.
Hi, i have followed all the steps, but i cant find the “post id”.
How i can got it?
Hello Fernando! Instead of asking for that in the comments, you should have typed in a Google query: “how to find facebook post id”. You will find the answer in 2 seconds. For example: How to get your fb id or post id
The post id you need to enter here is the combination of the pageid and post id, and it’s: pageid_postid. I believe there’s better tutorials available and it’s been quiet easy to find them online.
Hi bratza,
I need help set it up for my 2 FB pages & I would like to pay you to help me do it.
Please contact me ASAP 🙂
Hello! Please use the contact form and send me your Skype username. I’ll get back to you shortly. Thanks!
I’d also be interested in paying to help… I still cannot get the counter to work. Where is the “contact form”?
Hello Sammy! Thank you for contacting me. Please check out your email inbox.
I just emailed you…
Hey Bratza
First of all, thanks a million for giving the tutorial. Thanks a lot for putting it up in such a good orderly manner.
I have gone through the whole post & the comments as well and have managed to get it set up within an hour.
However, for the counts, it is behaving quite abnormally. Original counts for reactions is 2 for my post but the video is showing likes & love increasing and decreasing every second. (going upto 50, coming down to 0 and starting all over again) For now, I have stopped the live video and will start again later.
Could you kindly help me out for this? If possible?
Thanks in advance! 🙂
Hello! You are welcome! Thank you for your kind words! You need to disable the incremental function in the javascript. It’s adding +1 vote every 1 to 25 second, randomly. It’s quiet an easy fix to do.
how to do this? i cant find this in the comments..
Hello! You need to look at the javascript code below the getJSON url. It’s quiet obvious. Even a 5th grader could do it on his own. If you still don’t know how to do it, please consult someone who is familiar with Javascript, it will not take them too long to figure it out. Or you could use the contact form on the website.
Might make a video tutorial to make these surveys, thanks !!!
Hello Cesar! Please feel free to do so! The script is there to be used for free. I’m not charging any money for it. I’ll be glad to link back to your video, or you could even host it here if you want so. Thanks!
Hi Bratza!
Super thanks for this page. i got my poll up and running.
i just have one small question i cant find the answer in the comments.
only this:
You need to disable the incremental function in the javascript. It’s adding +1 vote every 1 to 25 second, randomly. It’s quiet an easy fix to do.
But where do i change this exaclty?
Thanks in advance!
Glad to hear that! Thanks for your kind words! You need to do that in the javascript code right below getJSON url. There are 2 increments for the 2 vote counters, each +1.
Visitor Rating: 5 Stars
Visitor Rating: 5 Stars
Hi there I’m having thiss error can you please help me ?
{
“error”: {
“message”: “(#100) Tried accessing nonexisting field (reactions) on node type (Application)”,
“type”: “OAuthException”,
“code”: 100,
“fbtrace_id”: “AnpipZKrH75”
}
}
Are you running a Business Page account (off of
business.facebook.com
)? If yes, then you might like to generate a user access token that is related to your admin account. I still need to investigate what was the problem and will post an update to the post soon. I will see what I can do to help, please use the contact form.Thanks a lot for this extremely amazing tuttorial
I changed the app so now it’s okey the the json gets the result but it does not change the numbers in the page.I triple check the comments but didn’t get the solution about this problem. I changed the setting ( add platform and turned off the native)
This is the json result:
{
“1227369313975440”: {
“reactions_like”: {
“data”: [
],
“summary”: {
“total_count”: 2
}
},
“reactions_love”: {
“data”: [
],
“summary”: {
“total_count”: 0
}
},
“id”: “1227369313975440”
}
}
Are you sure you replaced all the post_ids and not only that one in getJSON URL? Can’t tell for sure, but seems like you did not add correct post_id in print out function in javascript.
Visitor Rating: 4 Stars
Unable tu unlock to download the script. Can you check it?
Can you please let me know what kind of problems have you experienced? Thanks!
Hello and sorry to bother you, the debugger it is counting but there is no chance to fix the counting issue in the video. Please Please, help me. Screenshots:
* CODE WAS REMOVED due to user’s privacy *
Hello Kandi! Each times you need to use post_id which consists of both page unique number and post unique number, like you did for the first time in the getJSON url.
Please E-mail me or add me so you can help me out, I’ll donate. Thank you.
Visitor Rating: 5 Stars
Dear Bratza,
Thank you for the tutorial, I’ve been trying since past 4 days and I’m unable to execute it, even with the same code that you have written for the “index.html”, the only change i did to that code before running it was to add an “apostrophe” as you had mentioned in the earlier comments. then I obtained the access token for my page and also post id(which is the number in the url of the live post which i got by clicking on the time stamp, eg-“998872733555765”). made both the changes after going live and yet it did not work. I also changed the voting value back to zero has it was some 40k odd value in the code. I also have a doubt, is it mandatory to host the file on my web browser under a domain or can i run the “index.html” file as a local file from obs source settings? Please help I’m an admin of a football page and i so badly want to do this live reaction for my page. I asked so many other people for tutorial but no one helped. Thanks in advance 🙂
Hello! As previously explained, post_id is a combination of page id + post number from the url, separated with underscore (_). You can use any fb id finder site to find id of your page, if the page has only name in its url, and not numbers.
I got my ID’s but is it mandatory to host it under a domain?or can i run it as a local file via OBS(browser source).? I have another code too can i email it to you? please let me know.
Thanks alot
Hello! I’m not really sure how apps on localhost work, but you can try it and Google it if not. I remember seeing posts about FB apps on localhost.
Hello Bratza first of all THANK YOU for this great Tutorial ,
i’ve set everything up but the counter jumps up by 25 votes per second it goes even higher than the actual votes and than comes down to the correct amount of votes and goes up again and again like that, So i wanna make it go up 1 by 1 so it doesn’t go higher than the correct amount of votes.
If you can please help and thank you again for the tutorial.
Hello Ibrahim! The original script is increasing by +1 vote every 5 to 25 seconds, so it is impossible to increase it by 25 votes per second. You have probably messed up the original code. Please compare your code to the original code and try to do the correction.
Hello bro !
Thank for the tutorial. i followed the steps but i have a problem ;( live video works but reaction counter doesnt work i use BROWSER SOURCE From Local file not from domaine host any solution ?
thanks
Hello! If your getJSON url is returning correct results, then the problem is most definitely related to OBS Browser cache. It is probably displaying old version of your web page (before the post_id update). You might like to check out the rest of the comments since somebody has posted a solution for that problem, so you could delete the cache.
Please, someone has fixed the random valors? I don’t know about javascript. I only want the real votes. Thanks! Someone has index.html without random counter and it is working?
Just replace +1 incrementals in js with +0. It’s easy.
Visitor Rating: 5 Stars
hello bratza, my name is Viet, i’m form VietNam
the first i want to talk about me, i’m speak english not well, my skill reading english of me not good. So i think you will don’t understand all about what i say.
But please, i realy need your help because i can’t find anyone help me about live stream vote.
I find this link come to hear in socical group. But every peole in this group can’t running file index.
everything is ok but button like and heart not woking, it’s not update.
I already read all comment of every body and you in this page, and i already trying to fix file index but it still don’t woking
Please help me 🙁 if you have free time, please send me file index can working
this is code in file index of me:
* CODE REMOVED for privacy reasons *
When tried to run your API request, the JSON reply reports: “Invalid OAuth access token.” Try to generate a correct access token. Also make sure you replaced all post_id is index.html. First time post_id is used in JSON API request, and then 2 times more in the function that prints out the vote numbers, right below getJSON.
hi,
i have done all settings as per above document, my webpage working fine and updating the count information, but count is not updating in facebook video, i think after adding the post id in html file it is not refreshing in OBS streaming configuration ,
can you please help me to resolve this issue
Hi! Most definitely it is a problem with OBS Browser cache. There was a comment about it already. Please search for OBS Browser cache, somebody posted a solution on how to fix it. Or you could just rename the directory /live/ or index.html into something else and then update the link in OBS Browser. Let me know how did it go.
thanks , it is working fine now, i noticed that actually my count is 2 , but it show up to 6 , is it exact count numbers
I don’t understand. Did you remove the initial values for votes?
hi, when i try to start my second live video, i see the previous vote……. how i can delete it?
OBS Browser cache? Check out the comments above.
Visitor Rating: 4 Stars
BRATZA BRATZA BRATZA!!
The counter is working!!BUT PROBLEM STILL EXISTS!!
i ran the JSON url, and i got this as the output:
{
“856639394445767_999827193460319”: {
“reactions_like”: {
“data”: [
],
“summary”: {
“total_count”: 0
}
},
“reactions_love”: {
“data”: [
],
“summary”: {
“total_count”: 0
}
},
“id”: “856639394445767_999827193460319”
}
}
Here’s the problem! please help me!
keeping in mind that I’m running it as a LOCALFILE from OBS., the counter starts working all of a sudden out of no where, but the PROBLEM is, the counter is very ERRATIC! one second it’ll display 5:6(LIKE:HEART) the next second it’ll display 2:1 and just like that random combinations and also the maximum number it is displaying on the counter is 22 nothing more than that, as i said erratic! Even though i’m not giving any input yet it’s changing on it’s own! EVEN AFTER STOPPING THE STREAM ON OBS, THE VALUE ARE RANDOMLY CHANGING ON THE OBS DISPLAY!
Please help me!I believe i’m close to the final stage! please help!
Thanx in advance!:)
i even cleared by obs browser cache….%appdata%\obs-studio\plugin_config\obs-browser
Hello! You need to disable the incremental function in the Javascript part of the index.html code. Just replace the incremental value with 0. What you experienced is that the artificially incremented values (+1 vote every 5 to 25 seconds, randomly) get replaced with the real counter (every 10 seconds). All the time variables are not in sec but ms.
Im facing a new error, that is the ratio(like:love) is either 1:0 or 0:1 irrespective of the number of inputs i give
Hello Abhiram! I’m afraid I don’t understand your question. Will you please provide more information?
hi, I make it works somehow, though I can’t mak the counts working. also, about facebook token
I can see the link that you have posted (smashballoon) and got an access token the first time, however since I changed something in the app and reinititiate the app secret, smashballoon says now that either app id or secret key are invalid, but I copy those from FB app page, any idea?
so I believe that counts are not made since the fb access token is not right
anymore.
anyway thank you for this great share, we plan myself and a few other groups to use it to collect funds for associations and will sure link this page as a reward of your work
Hello Media22! Thank you for your kind words! Much appreciated! Please let me know is there anything I could do to help with your fundraising. I was not quiet able to understand what your problem was. Were you not able to generate the access token? Please try to use Graph API Explorer and try to generate access token for your page (choose a correct app and page). Facebook API Explorer link is posted somewhere in the comments above. Let me know how did it go.
Hello BRATZA,
first thank you for the great tool. After some promblems I got it working.
But now the question is:
How can I make it rund more than 4 hours on facebook as a live video? Or is the a little trick?
I know, that the voting will count after the live video too.
But the original voting of the president was always live in my opinion.
Best regards
Sebola
Hello Sebola! There’s two different types of Facebook Live Streams: continuous and non-continuous. The first one expires in 7 days and could be paused, the second one could not be interrupted, maximum length is 4 hours and it’s recorded and the post will stay published, as any other FB video.
To be honest, I don’t know what happens with continuous videos after they expire. I guess the post is removed. If anyone knows more about it, please let us all know. Thank you!
My stream is live at the moment.
On the Website the counter is ok. GetJson is ok, but in my video the counts are not listed. the counter ist still 0?
What do you think is the problem?
It’s either one of 2 problems: you forgot to replace all the post_id fields with your post_id (getJSON code and print out code below) and/or it’s your OBS Browser is having problems with cache. If it’s the 2nd problem, you could delete cache as explained in the comments above, or you could rename index.html or /live/ directory, and update the url in OBS Browser. Let me know how did it go.
Hi bratza,
I have got it working 🙂
But now I think there is a error in the index.html, because counters votes are jumping.
For example: now there are 100 likes, the next second there are 180 likes and after a whilie there are 106 likes.
Can you find a mistake in the index.html?
There’s no errors in the JS code. It was doing exactly it was supposed to do. The real fetch occurs every 10 seconds. The incremental function is updated every 5 to 25 seconds, randomly. Whenever a new fetch occurs, it will replace the current values. It might looks strange at the beginning, but it will look pretty much real as likes/loves start to pour in. Play with the incremental function and make it work the way you like (you could disable it). The code is free to be used and changed.
Thanks for the totorials … i was not able to have counter working in my case …. Can you help me with this … if you have any example page where counter is working,can you share me i will modify as per my requirements …
Hello! Please use the contact form on this website. Or, even better, reply to my email. I just emailed you. Let’s see what I can do.
Visitor Rating: 5 Stars
Hello again Bratza , to change the reactions is it enough just to change these lines ?
because i wanna transform the LIKE reaction into ANGRY reaction so is it enough just to change LIKE into ANGRY ?
th.text(9251 + res[‘{post_id_goes_here}’].reactions_love.summary.total_count);
hh.text(9221 + res[‘{post_id_goes_here}’].reactions_like.summary.total_count);
Hello Ibrahim! There was a list of all the reactions in either comments or the post #2 (not this one). Check them both and you will find all the potential values. You could do what you suggested. There’s always trial and error! 🙂
Here are my progress:
1. Video streaming on FB page works fine.
2. I have cleared OBS cache: AppData\Roaming\obs-studio\plugin_config\obs-browser
3. I got these message:
“reactions_like”: {
“data”: [
],
“summary”: {
“total_count”: 1
}
},
“reactions_love”: {
“data”: [
],
“summary”: {
“total_count”: 1
}
},
4. Voting counter doesn’t work.
Guys, need your help. Im burnt to test this script.
Inspecting each lines. Upload them, put it on OBS. Test and test again. It just doesn’t work at all
🙁
BTW, thank you very Bratza for the awesome tutorial
Hello! You are welcome! You probably forgot to replace all the post_ids in the code. You used a correct post_id (and token) in getJSON, but forgot to replace it in the JS code (right above) that prints out the values.
Hello,
I followed your instructions and it worked but after about 2 hours the counter stopped working altough the stream worked ok. Any ideea how to fix this ?
Thanks!
Was it working in any other browser at that point? There could be multiple reasons for this behaviour: your access token expired, the post was removed and/or expired, OBS browser stopped working,… You can start debugging the problem by opening the getJSON URL in your browser and finding out more about the response you will get from the Facebook API. Most of the times, there’s a very clear API error.
Visitor Rating: 1 Stars
Hi bro.
I used this method yesterday and everything was ok.
But the problem came when I closed OBS about 6 hours then I want to continue and restart streaming, it says error / expired stream key, like that.
Is that normal? If that so, then our desktops have to work 24 full hours non-stop for streaming and broadcasting? Can’t we pause the OBS and keep continue tomorrow?
What kind of stream have you used, continuous or non-continuous? If non-continuous, the stream was stopped (and recorded) right after the break. It is possible to pause and continue only a continuous stream.
Like and Love count is nit getting properly … its changing randomly .. can u help me out …
As already explained in the comments, you need to disable the incremental function.
For example: now there are 100 likes, the next second there are 180 likes and after a whilie there are 106 likes.
Can you find a mistake in the index.html?
There’s no mistakes in the code. You need to disable the incremental function, as already explained above. Change all +1 in javascript to +0. The incremental function is artificially adding +1 votes every 5 to 25 seconds, and it’s refresh every 10 seconds with the real votes. You just need to disable it.
this is exactly what i needed to know. thank you
You are welcome Fabz! I appreciate it! Help this website by sharing. Thank you!
Hello bratza this is so amazing! I have a question,, can I use free domain and free hosting for this?
Hello Bry! The script is created so it uses only Javascript and you don’t need any PHP or MySQL. Depending on the hosting I believe yes. I have even heard that somebody has managed to run it localhost. Let us know how did it go!
Hello bratza how to display author and command of last command in post? The counter work good ! Thanks
I’m glad that the counter is working! I’m afraid that I did not understand what you mean there by “author” and “last command”.
Visitor Rating: 5 Stars
Hi Bratza. Thank you for this amazing Tutorial. It works perfectly!
My first and last question is something about audio / music.
How can I enable music / audio on while broadcasting. Yes, music can be heard in Obs studio, but not on facebook. It could only be heard on facebook when the broadcasting has ended.
How do I fix this?
Thank you for your best support.
This looks like a FB bug. Or maybe your browser has problems with codecs? Which browser are you using?