How to share custom feed to facebook? - javascript

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 :)

Related

Social share from webpage

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!

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.

Creating a facebook likebox

A client of mine (a design studio) asked me to style the like-box social plugin on their site.
As far as I know this cannot be done now with the deprecation of "css" parameter on the fbml tag.
So the route I have to take is to recreate the like-box myself using the js SDK (or php SDK), but the problem is that I cannot find the users (and their photos) that like my page. I'm searching through the opengraph explorers parameters but i cannot find anything.
Does anyone know which url I must follow in the graph api to get what I want?
Do I have to have an access token for such an action? I noticed that the likebox plugin works event if you don't have a facebook account (It shows pictures).
Thank you.
You can't recreate the like box on your own. The Facebook APIs will not return a list of users who like your object. This was done to stop people from getting user lists of likers and spamming them.
Currently, you can only query to find if a specific, authenticated user or which of their friends likes your object.
You could build something similar by populating your fake like box with images of recent posters. You would need to deal with filtering out duplicates, and the page posting as itself, but this should get you started: /PAGE_ID/feed?fields=from.name,from.picture&limit=10
You will need an access_token to get this data. I'd authenticate as an app to do it.

How to create a facebook app and connect it to my old facebook page

I have a webpage and a facebook-page with a decent number of followers (fans). Now I want to integrate facebook in my webpage using the JS-SDK, this requires an application_ID from facebook. Creating an app from scratch will give me one, but it will not be connected to my old facebook page.
Is it possible to use my old facebook-page as a fan-page for a facebook app?
At the time of writing it seems like there is no way of connecting an old facebook page with a new facebook application. I ended up creating a seperate fb-application and keeping my old page. I use the new application to allow people to post their content on facebook, but I use the old page for likes to my website. Hopes this helps others wondering.
I was wondering about the same thing. I am creating a CakePHP application and I use Facebook in this application as well. I've had a Facebook page for my website for awhile and right now I have over 1000 followers/likes.
I wanted to get an API Key and Secret Key for that page, or create an APP from the page. I've looked everywhere on FB and cant find anything related. I really need to do that and if FB wont allow it, I really wanted to understand why.
If you found anything related to this please let me know. Thanks.

Categories