2

When I invite friends from facebook it displays Toast invitation was send but not display in friends notification.

I use Simple Facebook SDK for Android in my app. My invite is sent, but it isn`t displayed in friends wall. I asked the same question here: https://github.com/sromku/android-simple-facebook/issues/13

Can you tell me why I need Canvas? Can you explain what is Canvas and why we need it to make invites work?

I read facebook Canvas explanation. It is written that: "A Canvas Page is quite literally a blank canvas within Facebook on which to run your app. You populate the Canvas Page by providing a Canvas URL that contains the HTML, JavaScript and CSS that make up your app. When a user requests the Canvas Page, we load the Canvas URL within an iframe on that page. This results in your app being displayed within the standard Facebook chrome."

I don`t want my app to run from page, or it just will have a link to playstore?

What permissions I should ask?

Today I ask for: "user_friends","publish_actions".

Can you give me an example of invite friends that work with people that don`t have the app installed?

public void invite(String message, final OnInviteListener onInviteListener, String data) {
    InviteAction inviteAction = new InviteAction(mSessionManager);
    inviteAction.setMessage(message);
    inviteAction.setData(data);
    inviteAction.setOnInviteListener(onInviteListener);
    inviteAction.execute();
}

@Override
protected void executeImpl() {
    if (sessionManager.isLogin(true)) {
        Bundle params = new Bundle();
        if (mMessage != null) {
            params.putString(PARAM_MESSAGE, mMessage);
        }
        if (mData != null) {
            params.putString(PARAM_DATA, mData);
        }
        if (mTo != null) {
            params.putString(PARAM_TO, mTo);
        }
        else if (mSuggestions != null) {
            params.putString(PARAM_SUGGESTIONS, TextUtils.join(",", mSuggestions));
        }
        openInviteDialog(sessionManager.getActivity(), params, mOnInviteListener);
    }
    else {
        String reason = Errors.getError(ErrorMsg.LOGIN);
        Logger.logError(InviteAction.class, reason, null);
        mOnInviteListener.onFail(reason);
    }
}

The code is taken from Simple Facebook implementation. Am I missing something?

Thanks

Eugene
  • 69
  • 1
  • 5
  • According to the documentation: "Requests will only surface on platforms where the game has been defined in the app dashboard as having a presence. So for example, if an app exists on iOS and Android, but has no Canvas presence, recipients will not see requests received via that app appear on the desktop web version of Facebook.com." – WizKid Jun 02 '14 at 18:30
  • Thanks for answer, I added platform "App on Facebook", now I have to fill Canvas url. Can you give me example what should it be? – Eugene Jun 02 '14 at 19:04
  • Do you have a web version of your game? If so you need to port it over to canvas. You can read about how to make games for canvas at https://developers.facebook.com/docs/games/canvas – WizKid Jun 02 '14 at 19:08
  • Web version you mean if player can play the game from the web? – Eugene Jun 02 '14 at 19:11
  • Yes, so if you don't have a web version you should not add an App on Facebook platform in your configuration. – WizKid Jun 02 '14 at 19:20
  • If I don`t have web version than invites from the app won`t be seen in the web version of Facebook? Still I have the problem with invites that aren`t displayed in friends walls. – Eugene Jun 02 '14 at 19:36
  • Exactly. I can't find anything that say that requests should be displayed on friends walls on https://developers.facebook.com/docs/games/requests/v2.0 – WizKid Jun 02 '14 at 20:25
  • In this page: http://stackoverflow.com/questions/13878925/invite-friends-to-facebook-app-android-no-invitations-sent It was told that I need to turn on the App on Facebbok Tab in the app developer setting. What should be the canvas page? My app is only for android. – Eugene Jun 07 '14 at 17:06
  • That is not Facebook documentation – WizKid Jun 07 '14 at 17:07
  • I don`t understand what the canvas url for, and why I need it. – Eugene Jun 07 '14 at 17:09
  • Then skip it. Don't add it – WizKid Jun 07 '14 at 17:29
  • I have the same issue. I want android app to tell someone on a browser they got an invite. Then they link up to google play. The facebook documentation is telling me I MUST have a canvas app and it's not clear how that can accomplish our goal. – LEO Jun 27 '14 at 12:27

0 Answers0