Alternate methods to invite friends to facebook - javascript

I am working on a fan page and currently I am using an iframe app with the facebook send button embedded in it. I was wondering if there was a better way to invite people to a fan page, like a dialog box that opens with the list of the users friends, the user can then choose his/her friends and send invites. Is this still possible, since FBML tags have been deprecated. Thank you.
Regards
Ghulam Mustafa Majal

You can use our requests channel if you're making an iframe app on facebook which will allow your user to select and send a 'request' to their friends. Then you'll just want to make sure and how the like button on your landing page so when other users receive the request, they can like your fan page as desired.

Related

Is there a way to perform a "Submit" function outside of the website?

I am trying to figure out if it is possible to click on a button on the Amazon website from outside of the website.
For Example: At the bottom of every product review is a "Helpful" button. If a review was helpful, the reader/shopper can click this button to let the reviewer (and Amazon) know that the review was helpful. (It's basically a "Like" button).
What I'm trying to accomplish:
I want to post my reviews on my own website/blog and still obtain "Likes" without asking readers to click a link to a product page, then search for my review, then click the button.
You probably won't be able to do what you have in mind.
JavaScript can generally access information on another domain except if specifically configured in the origin website through CORS. Unless you own amazon.com, you won't be able to configure amazon's CORS headers to make them accessible to some JS running on your website.
You can however, from your website front-end, make a request to your website back-end that would be able to access amazon's data just like your browser does. Using a browser emulator like Puppeteer, you'll be able to launch an amazon page and programmatically retrieve infos, click on things and do other stuff.
However, the page that Puppeteer will be able to spin up will include credentials (cookies, localstorage content, auth token, etc) provided by your server, so Puppeteer will not see the same amazon.com your user sees on his browser, unless your user agrees to give you its amazon credentials, and at this point I'm pretty sure no user would do that, and that would not be authorized by amazon's terms of services.
TL;DR even if what you have in mind is not impossible, it would weeks for your and your team to code a system that would potentially allow you to do that, and that's provided the law is on your side, which is probably not the case.

Ionic/Angular/JS Create a click event to automate process

I am making an app that will preform several functions at once, the functions are sending an SMS and posting a message to Facebook and twitter
however, I have hit a wall, I can not find any information on how to automatically post to Facebook and Twitter and send an SMS.
I do not want the user to wait for the SMS messenger APP to open then tap send, then wait for Facebook to open then tap send and then wait for twitter to open and then tap send.
I want to send an SMS and Post to socials all at once.
is there any solution or advice for me and where to look.
I am using the IONIC shareSocials Plugin.
The only way would be via API integrations (but still..)
Remark: This would require the whole package..
Registering and setting up your app-clients for both FB and Twitter to allow integrating with their API's and allowing users to authenticate;
You'll need to implement the user authentication within your app to get their tokens after authenticating;
Handeling the auth-tokens in a secure way;
...
Below are the related API sections.
Twitter:
https://developer.twitter.com/en/docs/tweets/post-and-engage/overview
Facebook (only allows publishing to pages, not sure if there is still a way to post something to a user's feed):
https://developers.facebook.com/docs/graph-api/using-graph-api/#publishing
If you want SMS to be automated as well, you could look at SMS gateway API's, but these are not free (for large amounts) and are sending from a "general" number, not the user's number.
Example: https://gatewayapi.com/
If you will take a close look at those APIs you will see, that they return a page in response. This happens for a safety reason, this way they assure, that your data wasn't stolen. If the credentials are there, you go directly to the "message" view. But it is also another level of control, and posting without user interaction is a policy violation.
There was a way to post something without user interaction with opengraph, but now they are even more cautious about such things. That is also against their policy, which was recently renewed.

Send URL with Facebook UI, customized for each recipient

I am trying to make a service that allows users to share party invitations via the Facebook UI/API. What I want to do is send a custom link to each recipient the user designates so that the invitation can be customized and the RSVP form prefilled. I've looked in to the Messenger send method, but that looks like it only works with users that have already interacted with the app. What I'm looking at now is the send dialog, which does more or less what I'm looking for, but it only allows for prefilling one recipient user, and even if multiple users are selected I can't customize the link that each one gets.
The best solution I can come up with is to list the user's friends, and have a send button next to each one that sends my customized URL using the send dialog. This would mean the user interacting with the dialog repeatedly, which is obviously less than ideal. And there is also the downside that the user might add in other friends' names to the dialog, making them get an RSVP URL customized for another user.
Is there any good way to do this? Solutions in JavaScript or PHP are preferred, but I'm willing to try other languages if it would help.

how to use Facebook share button in my web page to share or post something to facebook page?

i am added a facebook share button to my website it is sharing or posting things to profile timelines but it is not sharing or posting anything to my page(like fans page in facebook).Is there anyway to choose to post to your fan page? any one can help me? plz..
Considering whatever is the "things" in your website, say a product with id 123, for example.
You can make users like it/share it using the standard fb-like button.
When they do like it and/or share it, it comes up as a thing they liked on your website. If that object of yours, has a proper URL with proper meta-tags, it will show up nicely on FB as a story. Good guide here
You can also use the facebook debug tool for testing if the sharing, meta tags are all working as expected here.
If you want your page to be the object of sharing, the only thing that can be done is users can like your page from your website. You cannot share stories from the API to the page, as the page is not an entity. Meaning its not a user.
So, if the page said,
User XYZ liked item ABC on yourwebsite.com
it won't make much sense to the people who see this.
Instead if userXYZ liked an itemABC on your site, the following update on FB will make much more sense.
UserXYZ liked itemABC on yourwebsite.com
(This will have a proper pictorial representation and a clickable link to your website if the like button and the destination url are configured correctly)

Facebook how to create button that share content with 1 click?

I have seen on many websites who have a button. That share a story to yours facebook profile when you click on it. I have tried the Facebook Share button, but a dialog appears.
How do I create a Facebook share button that share content with only 1 click?
you need to use open graph api in Facebook or add meta tags in the <head> </head> of your pages, where your share button is placed.
look at this section, Sharing Rich Media
But you should use Like button instead, Share button is deprecated by Facebook.
Facebook has many restrictions concerning sharing content. There are a few roadblocks to one-click sharing.
What you tried used the Feed dialog, which is the easiest way to share content to a user's profile or timeline. However, this brings users to a Facebook.com url where they must approve the content and enter their own message. You can set certain parts of what is shared (URL, title, description, etc), however under most circumstances you may no longer set the message that is shared. See http://developers.facebook.com/docs/reference/dialogs/feed/ for more details.
On the other hand, you can use Facebook Auth to publish to a users stream using the publish_stream permission. However, this is an advanced technique that requires extra work on the part of the developer. You must create an application, allow the user to login, and request the publish_stream permission from the user. After gaining permission, publishing to their stream can be accomplished with 'one-click,' or by simply using using javascript or server-side code.
The simplest solution is obviously using the Feed dialog, which is two-clicks, but a whole lot easier than Authentication.

Categories

Resources