views:

116

answers:

0

I am trying to develop facebook application using facebook web service as friends_get. I wrote a coding in jsp like<%

    try {
        String format = null;
        String flid = null;

        RestResponse result = FacebookSocialNetworkingService.friendsGet(request, response, format, flid);
        if (result.getDataAsObject(facebook.socialnetworkingservice.facebookresponse.FriendsGetResponse.class) instanceof facebook.socialnetworkingservice.facebookresponse.FriendsGetResponse) {
            facebook.socialnetworkingservice.facebookresponse.FriendsGetResponse resultObj = result.getDataAsObject(facebook.socialnetworkingservice.facebookresponse.FriendsGetResponse.class);
        } else if (result.getDataAsObject(facebook.socialnetworkingservice.facebookresponse.ErrorResponse.class) instanceof facebook.socialnetworkingservice.facebookresponse.ErrorResponse) {
            facebook.socialnetworkingservice.facebookresponse.ErrorResponse resultObj = result.getDataAsObject(facebook.socialnetworkingservice.facebookresponse.ErrorResponse.class);
        }
    //TODO - Uncomment the print Statement below to print result.
    out.println("The SaasService returned: "+result.getDataAsString());
     out.println("The SaasService returned: "+result.getResponseMessage());
    } catch (Exception ex) {
        ex.printStackTrace();
    }

    %>

When i just run the project i able to get output using localhost 8080. But when i run inside facebook , its doesnt show outpage only blank page i got. I used render method as iframe.