Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 579999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:25:33+00:00 2026-05-13T14:25:33+00:00

I have canvas FBML app for facebook in Java. I am trying to get

  • 0

I have canvas FBML app for facebook in Java. I am trying to get current user id using facebook java api in a controller, but without forcing every user to grand app access through facebook.com/login.php.

The trouble is that I don’t understand a facebook app workflow. In order to get userid I need to provide fb sessionid. In order to get session it seems like I have to forward all users to http://www.facebook.com/login.php?api_key=… which will prompt them for extra permissions. The thing is I don’t want to force everyone to give me extra permissions or to be logged in. Guests should be also able to use the app with limited functionality.

How do I separate guests and those who didn’t give me permissions from the rest without redirecting everyone without session to permissions page all the time?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:25:34+00:00Added an answer on May 13, 2026 at 2:25 pm

    I don’t know anything about the details of the Java API, but I can tell you about the two ways to get a user ID. The first, as you know about, is to require the user to authenticate the application. You don’t necessarily need to redirect the user anywhere to do this if you’re using FBML and put requirelogin="1" on some HTML links or form elements and an in-page “Authorise this app” popup will appear. Once they’ve authorised the app you’ll get the fb_sig_user parameter passed in each request.

    Secondly, you may get the user ID of a visitor passed to you in another parameter without them having authorised your app. This comes in the form of fb_sig_canvas_user, and you get it once the user has interacted with your application in some way. This may be from clicking on a link in an FBML canvas page or clicking on a feed story published by another user. fb_sig_canvas_user allows you to identify the user but not to make any API calls on their behalf. You can still prompt them to publish stories and send invites.

    With both methods, though, there’ll be some users who arrive at your application and you have no way of knowing who they are – not even their user ID. This is to protect the privacy of users and there’s no way around it – you either have to get them clicking on something, or get them to authorise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 404k
  • Answers 405k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer jQuery UI has a standard naming convention, you can view… May 15, 2026 at 5:39 am
  • Editorial Team
    Editorial Team added an answer Yes, sometimes, kinda... Serialization is a tricky problem. Don't solve… May 15, 2026 at 5:39 am
  • Editorial Team
    Editorial Team added an answer All is possible. I am not sure, that what you… May 15, 2026 at 5:39 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.