Ergebnis 1 bis 3 von 3

Erste Facebook App erstellen

Das ist eine Diskussion über Erste Facebook App erstellen im Grundlagen / Tipps Forum; Hallo Communty, ich habe mich nun drann versucht eine Facebook App zu programmieren. Habe die Grundeinstellung bei FB Devlopers eingestellt ...

  1. #1
    Neu hier
    Registriert seit
    18.01.2012
    Beiträge
    19

    Standard Erste Facebook App erstellen

    Hallo Communty,

    ich habe mich nun drann versucht eine Facebook App zu programmieren. Habe die Grundeinstellung bei FB Devlopers eingestellt und mir das PHP SDK angesehen.

    Leider finde ich nirgends die Möglichkeit festzulegen welche Genehmigungen ich für die App brauche.
    Normalerweise ist es doch so, dass wenn ich bei einer App die ich spielen möchte noch keine Genehmigung erteilt habe, erstmal das Fenster mit den Genehmigungen kommt - bei mir leider nicht - erst beim klick auf "Login using OAuth 2.0 handled by the PHP SDK: Login with Facebook".

    Auch habe ich aktuell (bei meiner nächsten Testapp) wieder das Problem, dass ich folgende Fehlermeldung bekomme:

    API Error Code: 191
    API Error Description: The specified URL is not owned by the application
    Error Message: redirect_uri is not owned by the application.

    und das ganze nur über meine eigentliche Domain öffenen kann.

    Ich hoffe ihr könnt mir helfen und den Einstig etwas erleichtern!

    Danke und liebe Grüße

    Thilo

  2. #2
    Administrator Avatar von Chronos
    Registriert seit
    08.01.2009
    Ort
    127.0.0.1
    Beiträge
    1.908

    Standard

    hi

    also ohne code kann man nur wenig helfen.
    Welche Permission für was gut ist siehst du hier: https://developers.facebook.com/docs...i/permissions/

    das es anscheinend nur eine Permission Abfrage über Login Button gibt zeigt mir das du anscheined nicht angemeldet bist, bzw. einfach die App falsch eingestellt ist so das er keine Userdaten bekommt, eben erst über den Login Button in welchem ja die Permissions übergeben werden.
    Ich höre 10 Stimmen in meinem Kopf, 9 sagen ich sei nicht verrückt, die 10. summt die Melodie von Tetris
    Join us - Starter_Forum@Twitter or join me brokenlinkAT@Twitter
    Kein Support per PN
    brokenlink.at - coming soon

  3. #3
    Neu hier
    Registriert seit
    18.01.2012
    Beiträge
    19
    Themenstarter

    Standard

    Hi,

    hier erstmal mein Code
    PHP-Code:
    <?php
    /**
     * Copyright 2011 Facebook, Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License"); you may
     * not use this file except in compliance with the License. You may obtain
     * a copy of the License at
     *
     *     http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
     * License for the specific language governing permissions and limitations
     * under the License.
     */

    require '../src/facebook. php '
    ;

    // Create our Application instance (replace this with your appId and secret).
    $facebook = new Facebook(array(
      
    'appId'  => 'XXX',
      
    'secret' => 'XXX',
    ));

    // Get User ID
    $user $facebook->getUser();


    // We may or may not have this data based on whether the user is logged in.
    //
    // If we have a $user id here, it means we know the user is logged into
    // Facebook, but we don't know if the access token is valid. An access
    // token is invalid if the user logged out of Facebook.

    if ($user) {
      try {
        
    // Proceed knowing you have a logged in user who's authenticated.
        
    $fbme $facebook->api('/me');
    $fbfr $facebook->api('/me/friends');
      } catch (
    FacebookApiException $e) {
        
    error_log($e);
        
    $user null;
      }
    }

    // Login or logout url will be needed depending on current user state.
    if ($user) {
      
    $logoutUrl $facebook->getLogoutUrl();
    } else {
      
    $loginUrl $facebook->getLoginUrl();
    }

    // This call will always work since we are fetching public data.
    $naitik $facebook->api('/naitik');

    ?>
    <!doctype html>
    <html xmlns:fb="http://www.facebook.com/2008/fbml">
      <head>
        <title>php-sdk</title>

      </head>
      <body bgcolor="#ffd700">
    <div id="fb-root"></div>
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    <script>
    FB.init({
    appId : 'XXX',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml : true // parse XFBML
    });
    </script> 

        <?php if ($user){
          echo
    "<a href='$logoutUrl'>Logout</a>";
      }else{
    echo
    "Login 
        <a href='https://www.facebook.com/dialog/permissions.request?app_id=303631276350497&display=page&next=http%3A%2F%2Fthigames.de%2Ffacebook%2Fgta_charakter%2F&response_type=code&state=12be01ad781c91285776ced7886b9611&fbconnect=1#'>Login with Facebook</a>"
    ;
        } 
    ?><?php if($user){?>
        

    <p><a href="ex1. php ">Example</a> - <a href="index. php ">Reload</a></p>
            <table border="1" cellpadding="0" cellspacing="0" width="500">
                <tr>
                    <td width="50"><img src="https://graph.facebook.com/<?php echo $user?>/picture"></td>
                    <td><?php echo "Hallo <a href='http://facebook.com/$fbme[id]' target='_user'>$fbme[first_name]</a>";?></td>
                </tr>
            </table>
            <?php echo $fbfr[data][0] <br><br>";



    ?>

      </body>
    </html>
    Ist es schlimm das ich kein SSL Zertifikat auf meinem Server bzw. auf meiner Domain habe, habe bei secure Canvas einfach die selbe URL mit https genommen?!

    Wie bzw. wo füge ich die permissions ein?

    Danke dir!

Ähnliche Themen

  1. Twitter versendet erste Werbetweets
    Von fox im Forum Aktuelles
    Antworten: 0
    Letzter Beitrag: 29.07.2011, 17:23
  2. Erstellen einer Video Applikation für Facebook.
    Von marco23554 im Forum Hilfe gesucht!
    Antworten: 34
    Letzter Beitrag: 09.04.2011, 18:24
  3. Antworten: 0
    Letzter Beitrag: 29.10.2010, 16:07
  4. Erste Beta von Chrome 6 erhältlich
    Von fox im Forum Aktuelles
    Antworten: 0
    Letzter Beitrag: 12.08.2010, 11:26
  5. Erste Ideen für HTML6
    Von fox im Forum Aktuelles
    Antworten: 5
    Letzter Beitrag: 15.01.2010, 14:55

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •