Social share from webpage - javascript

I am developing a website with share buttons for social medias like Facebook and Twitter. Like: Sharingbuttons.io
I was wondering if there is a way to implement the same share feature to Tik Tok, Youtube, and Vimeo. I researched and haven't found a way so far.

Not really, the thing is that Youtube, Vimeo, and Tik Tok do not really have a share like facebook and twitter do. Yes you can send messages to your friends, or post it on your youtube 'feed', but it doesn't quite work the same as facebook or twitter sharing.
Furthermore, if the capability existed, the website of the company would have all the information about creating embeded share buttons such as facebook an twitter do. Similar with their API information.
I know it's probably not the answer you wanted, and I might not be 100% correct, but after looking around for a bit and testing some of my own code, I did not manage to find an effective solution.
DISCLAIMER:
I am not responsible for anything you do, this is just for information purposes only.
A complicated workaround might be to save the webpage you want the user to be at when they click the button, in this case your Tik Tok share page, and then feed their comment into the empty textboxes using javascript, but then when they are redirected to this site, they would be asked to signin, and their information would be needed. Then all the stuff they wrote when they were planning on sharing would disappear and they would be logged into the Tik Tok page.
Also this is probably illegal begause it involves you serving them a page that is "Tik Tok", but in reality it's just your webpage so you can pass information along to the real website.
Cheers!

Related

Clean way to post users web page shares to Facebook page

I am looking for a way to show Facebook engagement on from our website on our Facebook page. IE, when someone likes/shares etc. a page on the website, that that activity be reflected by our Facebook page in some way.
I was planning on using the graph API calls to do page updates, but the permissions are granted to users, not to the app itself, meaning this would only be possible for existing administrators, defeating the whole purpose (Perhaps a bit obvious in hindsight).
Is there a good, clean way of posting page likes/shares of our web pages to our Facebook page feed?
Notes:
I'm working in PHP and/or client side JS
A high volume of posts drowning our regular content is not likely at the moment, however, advice about how to manage such a beast in the long run might be helpful
If I understood correctly and want to share content from Facebook into your Website, the behavior you mention used to exist via the Activity Feed or Recommendations Feed. However, it has been deprecated since Graph API version 2.3.
If what you want is to update comments from people in your Website to your FB Page, you could implement something in your backend which listens to content uploaded and uses your Page Access Token to create custom stories using your user's data. As you mention, it won't happen in the name of people, but you could be creative and make the text narrate what people did on your website. Maybe even use OpenGraph for this.

Writing a comment onto a 3rd party facebook wall via website link

Really wracking my brains about how to do this but i basically dont even know where to start.
Basically twitter has functionality that allows a link to open a twitter box that a user can populate and then post directly onto a chosen twitter feed:
https://about.twitter.com/resources/buttons#mention
Its super simple, all it requires is changing the URL parameters of the target link.
Im trying to do something similar with facebook. Ideally a link clicked on my site would open a facebook page with a prompt for user to type their comment and login to post to the 3rd party wall. I definitely do not want to be handling any FB authentication on my end as i imagine this would be far beyond my rather novice coding abilities.
An alternative would be to capture the comment with a text box on my end and then pass this through to facebook to write onto the wall.
Ive trawled the net and stack exchange looking for solutions but most seem to be geared to putting a comment on the users wall rather than a 3rd party.
Honestly im not super active on any social media anyway so my knowledge of how they function is quite limited. If anyone could give me a steer and some possible solutions (or alternatively just out and out that it is impossible) that would be fantastic.
You can use the Facebook JavaScript SDK, and invoke the feed dialog using that.
The feed dialog has a to parameter into which you can fill the Facebook ID of the profile that you would like the user to post to. However, the profile who's ID you fill in there must have authorized the same app as the one that you initialized the SDK for. That means this approach is likely impractical.
In any event, here's a piece of example code.
If you would like to use graph API to post to a profile's timeline (using the profile-ID/feed POST endpoint), you'll have to implement Facebook Login as well. However, since Graph API v2.0 is mandatory for all apps now, you can only find those profile IDs of people who have also authorized the same app.
This is probably even less practical for you, given that you don't want to implement Facebook login.
As far as I can see, these are your only options to achieve what you are looking for at this time.

Auto share web content on my facebook wall

I have a classified website for user to post anything to sell. When user confirm posting on my website. i would like to post his/her selling item in my fb wall as well to get more audiences. Does anyone know what to look for? In trying to research but share and like button are not my solution. Many thanks
You will want to take a look at the Facebook PHP SDK.
https://developers.facebook.com/docs/reference/php/4.0.0
You will need to sign is as a developer with Facebook and create an app for your website. You'll find examples on the developer website that will help you.

How do I know when someone has shared my link on social media

On my website I want to make certain features available after a person has shared my link on Facebook or Twitter, etc. So the idea is to ask the visitor to share my link. Then after they share the link, to create a cookie for them. Then I would check said cookie to determine if they have access.
My question is how do I know the person has shared? So say the person clicks on the Facebook button. Then possibly he has to login into Facebook. After the actual sharing is done, what kind of feedback do I get so that I can go create the cookie?
If the whole thing can be done in javascript and html that would be great, but in case the server has to be involved, I am using python. Again, I know how to write my code about setting cookie and about asking someone to share on social network. The one thing I don't know is how do I get the feedback that the sharing actually took place?

How to share custom feed to facebook?

I have a web page that has the user take a quiz, I would like them to then be able to share their results on facebook. I am using html, javascript, and jquery. I am wondering if there is a way to share custom feeds on facebook. Most people use php however I do not want to use php just keep it client side. I have been on facebook's documentation for a few days now and I can't seem to get a straight answer on how to add a button or link to my page that will share what I want it to share rather than the meta data of my site. Thanks in advanced.
https://developers.facebook.com/docs/reference/dialogs/feed/
The FB.ui feed dialog is perfect for that, JavaScript SDK only :)

Categories