Skip to content

Commit 5043853

Browse files
committed
Facebook persistent menu
1 parent 8457d4a commit 5043853

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

ChatGPT/src/main/java/cloud/cleo/squareup/FaceBookOperations.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static void addPrivateShoppingMenu(String id) {
9898
.addObject()
9999
.put("type", "web_url")
100100
.put("url", "https://" + PRIVATE_SHOPPING_URL)
101-
.put("title", "Book Appointment Now!")
101+
.put("title", "Book Shopping Appointment Now!")
102102
.put("webview_height_ratio", "full");
103103

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

128128
/**
129-
* Send our private Shopping URL as a Messenger Button
129+
* Send our private Shopping URL as a Messenger Button. Leave here for now,
130+
* seems cleaner to let Bot send the URL instead of a button.
130131
*
131132
* @param id of the recipient
132133
* @return true if successfully sent
133134
*/
135+
@Deprecated
134136
public static boolean sendPrivateBookingURL(String id) {
135137
HttpURLConnection connection = null;
136138
try {

ChatGPT/src/main/resources/fb_commands.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,13 @@ curl -X POST -H "Content-Type: application/json" -d '{
2424
}
2525
]
2626
}' "https://graph.facebook.com/v20.0/me/messenger_profile?access_token="
27+
28+
29+
curl -X POST -H "Content-Type: application/json" -d '{
30+
"greeting": [
31+
{
32+
"locale":"default",
33+
"text":"Hello {{user_first_name}}, Copper Bot is here to assist you with product and store questions and you can always ask for Person"
34+
}
35+
]
36+
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=

0 commit comments

Comments
 (0)