עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בעיה בפיתוח אפליקציית פייסבוק בסביבה לוקלית

Featured Replies

פורסם

הבעיה היא שהפונקציה:

$this->facebook->getUser();

שאמורה להחזיר אם היוזר מחובר או לא, תמיד מחזירה 0 (גם כאשר מחובר)

זו בעיה שהרבה נתקלו בה (גוגל) אבל אף אחד מהפתרונות אינו ברור , אשמח לעזרה ממישהו שמכיר את הנושא

לפי מה שכן הבנתי מהפתרונות בגוגל שזה בעיה של דומיינים שונים וSCOPE שונה של סשן. אבל זה מידע שלא תורם לי בפתרון.

להלן מידע נחוץ:

הגדרות בפייסבוק: site Url: http://localhost:80/appName

הערה: הקוד נכתב בסביבת codeIgniter

וזהו הקוד:

           $facebookConfig =array(
'appId' => '************',
'secret' => '*********************************',
'cookie' => true
);

$this->load->library('facebook',$facebookConfig);

$user = $this->facebook->getUser();


$loginUrl = $this->facebook->getLoginUrl( //קישור לחיבור ההרשאות המבוקשות
array(
'scope' => 'email,publish_stream,user_birthday,user_location,user_work_history,user_about_me,user_hometown'
)
);

if ($user) { //בדיקה אם המשתמש קיים
$user_profile = $this->facebook->api('/me');
debug($user_profile);
}
else if (!$user) {
echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>";
exit;
}

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.