Messenger Extensions Javascript SDK Error 2071011

后端 未结 3 1113
天涯浪人
天涯浪人 2021-02-04 14:51

I\'m trying to create a Messenger Web View (https://developers.facebook.com/docs/messenger-platform/messenger-extension) by using the Messenger Extensions Javascript SDK.

<
3条回答
  •  说谎
    说谎 (楼主)
    2021-02-04 15:24

    MessengerExtensions.getUserID(function success(uids) {
                // triggering on devices
                self.defer.resolve(uids.psid);
            }, function error(err) {
                MessengerExtensions.getContext(config.fbApp.id, function success(result) {
                    // triggering on desktop
                    self.defer.resolve(result.psid);
                }, function error(result) {
                    self.defer.reject(result);
                    console.log('Context Error ', result);
                });
            });
    

提交回复
热议问题