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.
Related
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.
We are using zapier's webhooks to collect answers we gather via html5 formatted mail messages. The mail is created with zapier and includes some dynamic info and two buttons to make your choice. These button actions are each linked to a different webhook. The webhook provided by zapier has a static part and a dynamic part which is a zapier variable. When the receiver pushes the button, a blank browser window shows up with, whether a short text or in "silent mode" a blank page.
Although we are sending an extra mail as confirmation for the decision made via mail, we would like to either avoid the showing of this blank page at all or maybe replace it by a customized HTML page that shows a more attractive web page.
We tried different approaches like using an additional javascript onlick action on the button to achieve the opening of two pages with one click. One with the webhook blank page as the trigger and another one with a nice confirmation message page for a nice user experience. Unfortunately, there are some mail client limitations that seems not to allow javascript executions.
Is there any workaround like using any third-party service that offers webhook containers with the possibility to customize the content of the page linked to the webhook URL or any idea on how to link a button action to two url’s?
Thank you for reading this long question. Any help would be greatly appreciated.
David here, from the Zapier Platform team.
I can't speak to other options, but the best choice for you here is probably to have the email link go to a static page with two buttons. That way, you'll be in the browser and can do whatever you need with JS. This is likely buttons that have onClick handlers and then show nice confirmations.
It also avoids false clicks, where a mail client tries to load external resources (which normally doesn't matter, but in this case can trigger a webhook).
I am making an image gallery, and I wish to have a vote up button people can press to increment the number of votes an image has received. Obviously I don't want people spamming the vote up button, so I want to limit each user to 1 vote up.
I do not have access to any kind of database (except writing to files), and a login system would not be good for my target audience.
What is the best way to store whether a user has visited the page before? Would it be better to use PHP or JavaScript or something else for this?
Without an authentication system, you can limit the action of a user temporarily, but the user can trick your system to vote multiple times.
Here are solutions not using a login/auth system (and their drawbacks) :
You can store the upvote action client-side with cookies, localstorage or any other mean, but the user can clear all off that to regain the right to vote again. For most people it can be ok (depends on your audience), but any techy guy wanting to cheat the system will be able to do it.
You can store the update action server-side with a reference such as the user-agent or the IP adress. But these "authentication" system are not reliable : user can share the same user-agent and change them easily. Several user can share the same IP adress and use proxy to change their IP adress.
The third solution is to use an external system : a facebook +1 voting system (facebook uses its own auth system) or google+ or other external services. User won't be able to trick the system, but you don't own the upvote count on you side and someone without a facebook or google+ account will not be able to vote.
Personally I would go and find myself a database... but if you don’t want to use one, you can still write to a file. For example: Create an array and store the IP address of the user in it. Than write this array as JSON code to a file (json_encode) and store it. When a user clicks the like button, read the file, decode the json (json_decode) and check if the IP address exists in the file. If not: add to array and store to the file. The amount of likes, is equal to the amount of IP addresses in the JSON object.
The best way to implement this, is to make an ajax call when the like button is pressed. Than the visitor won’t see a page load.
Note: Technically you can set a cookie, to "remember" that the user already clicked the button. That would save you some reading of the file in which the likes are stored.
I am curious about submitting a form data internally.
Here is an example.
I want to register an account for a website. The website will give a form to register which upon submitting will create an account for me.
But I don't want to go to that site. Instead I'll give a form in my style and collect the same information. Upon submit, I want to create the account automatically. Automatically in the sense, I'll submit the form internally.
The reason why I need this feature is, I don't want my users to create a separate account in another website also. I mean it should save user's time in creating account only. Rest of the things will be taken care by me.
Please let me know if anyone had tried this and had success.
I know it is very difficult for existing accounts and some internal errors. But I also need to track them.
Please let know if this is possible or not.
An Example
There is site called othersite.com which has a form for creating / registering users.
I will a similar form to the user on mysite.com. But upon submit the form information is sent to both mysite.com and othersite.com. Both sites create accounts parallelly with a single form submission.
Unless you are working with AJAX requests and CORS enabled sites, which I assume is not the case, client side technologies ( browser/javascript ) will not help you much to do that.
You have to ask yourself what are the options to integrate with the second site in order to automatically create the account. Following some common patterns used these days:
REST API: You have an url where you can use HTTP to talk to and ask to create the account. Many social networks and other popular services usually expose it. Facebook API
Database: Although it is less recommended you could just insert a new record into the account table if you own and have access to the database used by the second site.
Client Libraries: Some sites provide client libraries so that you can use them together with your project code base. Eg: Twitter Libraries
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.