Facebook PHP SDK Connection -


I am looking for answers for this site for a while and I can not find anyone for this problem, Hope someone can give me a hand I am not really an experienced PHP programmer, so what I am doing may have some serious mistake.

Anyway, I am working with another developer who does not code in PHP and needs access to it. Facebook's information is being said that I try to develop a Facebook class I am doing what surrounds all Facebook graph calls which allow my friend to call a function and no need to worry about the functions of any Facebook PDF SDK. In this class I have placed a separate file named CAFCEBPPP. The code for this category can be found below (I just copied the example of the Facebook website)

   & gt;"; $ Login_url = $ this- & gt; FBObject-> GetLoginUrl (); Echo 'please & lt; A href = '' $ login_url. ' "& Gt; Login. & Lt; / a & gt; 'eko $ this- & gt; FBObject- & gt; getAccessToken ()." & Lt; Br /> "eko $ this-> FBObject-> getApiSecret ()." & Lt; Br /> error_log ($ E & gt; GetType ()); error_log ($ e & gt; getMessage ());}} Else {// UI user user is not logged in to return and The user can re-sign in. If the user is logged out, you may have a user id, though the access token is invalid. In this case, we will get an exception, so that we // just use the user Ask to log in again. $ Page = "http://fratlabs.com/FacebookTest.php"; $ Login_url = $ this-> FBObject- & gt; getLoginUrl (array ('scope' = & gt; Email; // $ logout_url = $ this-> FBObject- & gt; getLogoutUrl (array ('next' = & gt; 'http: / / http: / / home_live, user_likes, user_homain', 'redirect_uray' => /fratlabs.com/FacebookTest.php ')); Echo' please & lt; a href = '' $ login_url. ' "& Gt; Login. & Lt; / A & gt; '; // resonance 'logout url: & lt; A href = '' $ logout_url. ' "& Gt; Logout & lt; / a & gt; 'error_log ($ E & gt; GetType ()) error_log ($ E & gt; getMessage ());} // resonate $ this- & gt; FBObject- & gt; getLogoutUrl (array ('next' = & gt; 'http: //fratlabs.com/FacebookTest.php'));}   

} < P>?

This class is included in a test page and it has been done immediately, where Facebook login has also been returned. All these calls have to be included in the page because a Facebook login is returned? The only thing that is confusing me is that Once that blue moon code will work and I will actually make Facebook a link, but every time I am stalking on the "Please login" link on the login page.

-

text ">

While I am not a php expert myself, my It is believed that objects are used to capture objects to capture exceptions, usually logic operations as message output Not in the form of a form (such as / other) Your script looks like an introduction to FB session and a different approach like authenticating the user in first class and presenting user information in another class. But for your partner who wants only FB user information, the message can not be successfully logged or authenticated if the user is delivered in another category.

For example (without the function), I use the code.

Comments