Skip to content

Commit

Permalink
Facebook persistent menu
Browse files Browse the repository at this point in the history
  • Loading branch information
docwho2 committed Aug 5, 2024
1 parent 8457d4a commit 5043853
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static void addPrivateShoppingMenu(String id) {
.addObject()
.put("type", "web_url")
.put("url", "https://" + PRIVATE_SHOPPING_URL)
.put("title", "Book Appointment Now!")
.put("title", "Book Shopping Appointment Now!")
.put("webview_height_ratio", "full");

log.debug("Post Payload for Private Shopping Menu" + json.toPrettyString());
Expand Down Expand Up @@ -126,11 +126,13 @@ public static void addPrivateShoppingMenu(String id) {
}

/**
* Send our private Shopping URL as a Messenger Button
* Send our private Shopping URL as a Messenger Button. Leave here for now,
* seems cleaner to let Bot send the URL instead of a button.
*
* @param id of the recipient
* @return true if successfully sent
*/
@Deprecated
public static boolean sendPrivateBookingURL(String id) {
HttpURLConnection connection = null;
try {
Expand Down
10 changes: 10 additions & 0 deletions ChatGPT/src/main/resources/fb_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ curl -X POST -H "Content-Type: application/json" -d '{
}
]
}' "https://graph.facebook.com/v20.0/me/messenger_profile?access_token="


curl -X POST -H "Content-Type: application/json" -d '{
"greeting": [
{
"locale":"default",
"text":"Hello {{user_first_name}}, Copper Bot is here to assist you with product and store questions and you can always ask for Person"
}
]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=

0 comments on commit 5043853

Please sign in to comment.