facebook: can't send email from app to user

Posted by flybywire on Stack Overflow See other posts from Stack Overflow or by flybywire
Published on 2010-03-11T04:53:41Z Indexed on 2010/03/11 4:55 UTC
Read the original article Hit count: 347

I can't send email to my app users, even though I have the permissions.

I am working with the java library, although I don't think it is related to that.

long uid = ...;
Collection<Long> uids = new ArrayList<Long>();
uids.add(uid);
FacebookXmlRestClient client = new FacebookXmlRestClient(api, secret);
boolean sendEmailPerm = client.users_hasAppPermission(Permission.EMAIL,uid);
System.out.println("Can send email: "+ sendEmailPerm);
Collection<String> sent = client.notifications_sendTextEmail(uids, "subject", "body");
System.out.println("Succesfully sent email to: "+sent);
sent = client.notifications_sendFbmlEmail(uids, "subject", "body");
System.out.println("Succesfully sent email to: "+sent);

I am trying both with fbml and text email. I can also obtain the user's proxied_email property but when I send email to that address with my regular mail client is doesn't arrive.

The output is:

Can send email: true
Succesfully sent email to: []
Succesfully sent email to: []

© Stack Overflow or respective owner

Related posts about facebook

Related posts about facebook-api