עבור לתוכן
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.

בעיות בשרת Apache עם PHP ו- Facebook API

Featured Replies

פורסם

היי,

לאחרונה שיחחרתי איזה משחק שבניתי בפייסבוק ולצערי דווקא בתקופה של השחרור שהיא הכי קריטית השרת שלי התחיל לקרטע.

השרת שלי מבצע קריאות פשוטות אל מול פייסבוק, וכל פניה הכי פשוטה מקבלת ברוב הפעמים שגיאה כמו -

couldn't connect to host

לדוגמה שורות פשוטות כמו -



$session = $facebook->getSession();

$currentID = $facebook->api('/me?fields=id');

מוציאות לי שגיאה כזו





Exception in GetUserID: couldn't connect to host StackTrace: Array
(
[0] => Array
(
[file] => /users/home/aagnt2sv/web/public/Facebook/facebook-php-sdk-7d538d3/src/facebook.php
[line] => 523
[function] => makeRequest
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => [url]https://graph.facebook.com/me?fields=id[/url]
[1] => Array
(
[method] => GET
[access_token] => 104269778819|2.AQAKqpIXE0jqFuoU.3600.1311008400.1-785849095|qxtBqmWWRMc_GpM77CK77RbO4YA
)


)


)


[1] => Array
(
[file] => /users/home/aagnt2sv/web/public/Facebook/facebook-php-sdk-7d538d3/src/facebook.php
[line] => 491
[function] => _oauthRequest
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => [url]https://graph.facebook.com/me?fields=id[/url]
[1] => Array
(
[method] => GET
)


)


)


[2] => Array
(
[function] => _graph
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => /me?fields=id
)


)


[3] => Array
(
[file] => /users/home/aagnt2sv/web/public/Facebook/facebook-php-sdk-7d538d3/src/facebook.php
[line] => 444
[function] => call_user_func_array
[args] => Array
(
[0] => Array
(
[0] => Facebook Object
(
[appId:protected] => *censored*
[apiSecret:protected] => *censored*
[session:protected] => Array
(
[uid] => *censored*
[access_token] => 104269778819|2.AQAKqpIXE0jqFuoU.3600.1311008400.1-785849095|qxtBqmWWRMc_GpM77CK77RbO4YA
[expires] => 1311008400
[sig] => ddf14dcaa953cb64d3f98b0649b60613
)


[signedRequest:protected] =>
[sessionLoaded:protected] => 1
[cookieSupport:protected] => 1
[baseDomain:protected] =>
)


[1] => _graph
)


[1] => Array
(
[0] => /me?fields=id
)


)


)


[4] => Array
(
[file] => /users/home/aagnt2sv/web/public/edamometer/EdamometerWS.php
[line] => 31
[function] => api
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => /me?fields=id
)


)




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

השרת הוא שרת שקיבלתי בחינם מ- joyent במסגרת תוכנית משותפת שלה עם פייסבוק למפתחי אפליקציות.

למישהו יש מושג??

תודה!

ארכיון

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

דיונים חדשים

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.