从facebook向我的服务器发送参数数量

时间:2012-10-29 20:00:15

标签: java facebook jsp notifications href

我有一个Facebook应用程序将她的回复发送到我的服务器硬编码。 我的服务器是一个tomcat收到响应(Facebook通知)。

我希望使用我的应用程序的用户会收到通知,当他点击通知时,他将从我的服务器接收一个index.jsp页面。

我发送通知并添加了我希望使用的服务器接收的href:

  var messageToSend = "https://graph.facebook.com" + id + ... +
            +**"&href=?username=" + userName + "&userid="+ userId** + "&template=" +
            notificationContent + "&method=POST&format=json";

我想在服务器端获得userId和userName。

在服务器端我写道:

String userName = request.getParameter("username"); 
String userId = request.getParameter("userid");

我获得了userName但userId为null。

我应该如何向服务器发送多个参数?

0 个答案:

没有答案