Reputation: 69
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
Upvotes: 2
Views: 2097