Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19046

Android: error with requestWithGraphPath and facebook sdk 4.0.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Titanium CLI
      CLI Version = 4.0.0-beta8

      Titanium SDK
      SDK Version = 4.0.0.RC5

      Facebook modules ver. 4.0.0

    • Sprint:
      2015 Sprint 21 SDK

      Description

      I have just started working with Appcelerator Studio. But when I try to use the new facebook sdk 4.0.3 I no longer use the follow request:

      facebook.requestWithGraphPath('xeniagympalestra/albums? fields=id,name,cover_photo,count&format=json', {}, 'GET', function(e) {
      	if (e.success) {
      		var result = JSON.parse(e.result);
      

      I have made the following changes, found in the documentation of the module Facebook in Appcelerator documentation:
      http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook

      1) Add

      <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
      <activity android:name="com.facebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="Xenia Gym"/>
      

      in tiapp.xml file

      2) Add

      <?xml version="1.0" encoding="utf-8"?>
       
      <resources>
      <string name="app_id">1615395XXXXXXXXXX</string>
      </resources>
      

      in platform/android/res/values/strings.xml file
      3) Add

      var facebook = Alloy.Globals.Facebook;
       
      $.index.fbProxy = facebook.createActivityWorker({
      	lifecycleContainer : $.index
      });
      

      in index.js file
      4) Add

      var facebook = Alloy.Globals.Facebook;
      facebook.permissions = ['read_stream'];
      

      But the result are these errors:

      Bad request, contact the developer and log a bug
      

      for android platform

      FBSDKLog: Error for request to endpoint 'xeniagympalestra/albums?fields=id,name,cover_photo,count&format=json': An open FBSession must be specified for calls to this endpoint.
      

      for iOS platform

      The same request was working with the facebook module ver 3.x.x

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msamah Ashraf Abu (Inactive)
                Reporter:
                alexgalvagno Alessandro Galvagno
              • Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code