İçeriğe geç
KAMPANYA Kurumsal Web Paketi — $499'dan başlayan fiyatlar Web & Logo Tasarımı · Kurumsal E-posta · LiteSpeed + CloudLinux · Imunify360 Güvenlik · cPanel Yönetim · 3 Gbps DDoS Koruması 00 Gün 00 Saat 00 Dk 00 Sn
AIOR

How to Create a Facebook Login App for XenForo — Complete OAuth Flow

Sektör topluluğu — sorularınız, deneyimleriniz ve duyurularınız için.

How to Create a Facebook Login App for XenForo — Complete OAuth Flow

Aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
895
Reaction score
2
Points
18
Age
40
Location
Turkey
Website
aior.com
1/3
Thread owner

Facebook OAuth — Neden Hâlâ Önemli?​

Google + Apple Sign-in popüler olsa da Facebook Login Türkiye dahil pek çok pazarda hâlâ yaygın. Forum üyelerinin sosyal kayıt ile katılması, kayıt sürtünmesini düşürür ve daha tamamlanmış profilleri (isim, profile picture) hazır getirir. XenForo Facebook entegrasyonunu yerleşik olarak destekler — sadece Meta Developer Console'da bir uygulama oluşturmanız yeterli.

Adım 1 — Meta Developer Hesabı​

https://developers.facebook.com/ adresine gidin ve Facebook hesabınızla giriş yapın. İlk kez girdiyseniz "Get Started" akışını tamamlayın. Sonra My Apps → Create App.

Adım 2 — App Type Seçimi​

App use case soruları soracaktır. Şunu seçin:
- Authenticate and request data from users with Facebook Login

Sonraki ekranda app detayları:
- Display name: "AIOR Community" (kullanıcıya görünecek)
- Contact email: hi@aior.com
- Business account: opsiyonel (bizim için boş bırakılabilir)

"Create app" tıklayın. Sistem size 16 haneli App ID ve App Secret üretir.

Adım 3 — Facebook Login Ürününü Ekleme​

App dashboard'da Add a Product bölümüne gidin. Facebook Login kartında "Set Up" tıklayın. Sonraki ekranda platform seçimi: Web.

Site URL: https://aior.com

Adım 4 — OAuth Settings​

Sol menüde Facebook Login → Settings'e gidin.

Valid OAuth Redirect URIs:
Code:
https://aior.com/community/register/connected/facebook
https://aior.com/community/login/connected/facebook

URL'lerin XenForo install path'inizle uyumlu olduğundan emin olun.

Client OAuth Login: Enabled
Web OAuth Login: Enabled
Enforce HTTPS: Yes (production gereksinim)

"Save Changes" butonuna basın.

Adım 5 — App ID ve Secret'i Kopyalama​

Sol menüde Settings → Basic'e gidin. App ID ve App Secret değerleri görünecek. App Secret yanındaki "Show" butonuna basın, Facebook şifrenizi tekrar isteyebilir. Her iki değeri de güvenli not edin.

Adım 6 — App Review (Production İçin Şart)​

Yeni app default olarak "Development" modundadır — yalnızca app role'üne eklenmiş kullanıcılar Facebook ile giriş yapabilir. Üretim için:

1. App Review → Permissions and Features'a gidin
2. public_profile ve email izinlerinin "Approved" olduğunu doğrulayın (yeni app'lere otomatik veriliyor)
3. Settings → Basic altında "Privacy Policy URL" doldurun (https://aior.com/privacy-policy)
4. App icon yükleyin (1024x1024 PNG)
5. App Review → Status sayfasından "Make app public" tıklayın

Adım 7 — XenForo Admin Yapılandırma​

XenForo Admin → Setup → Connected accounts. Facebook provider'ını Enabled yapın.

- App ID: xxxxxxxxxxxxx
- App Secret: yyyyyyyyyyyyy

Save.

Adım 8 — Test​

Incognito tab'da https://aior.com/community/login'i açın. "Sign in with Facebook" butonunu tıklayın. Facebook login ekranı + permission dialog'u (email, profile) görünecek. Allow tıkladığınızda XenForo'ya geri yönlendirilir; yeni hesap oluşturulur veya mevcut eşleştirilir.

Yaygın Hatalar​

"URL Blocked: This redirect failed": Valid OAuth Redirect URIs'da URL tam eşleşmiyor. http vs https, trailing slash, www prefix kontrolü.

"App not active": App "Development" modundadır. Public yapın veya test kullanıcıları ekleyin.

"Invalid Scopes: email": App Review'da email permission "Approved" değil. App Review → Permissions sayfasından kontrol edin.

"#_=_" URL kalıntısı: Facebook redirect sonrası URL'de #_=_ kalır. XenForo bunu otomatik temizler ama bazı eski sürümlerde manual fix gerekir — JavaScript ile if (window.location.hash === "#_=_") history.replaceState(null, null, window.location.href.split("#")[0]);

Privacy Policy Gereksinimi​

Meta Production app onayı için detaylı bir Privacy Policy URL şarttır. AIOR formunda https://aior.com/privacy-policy sayfasında kullanıcı verisinin nasıl işlendiği, ne kadar süre saklandığı, hangi 3. taraflara aktarıldığı belirtilir. KVKK ve GDPR uyumu için bu zorunludur.

AIOR olarak XenForo barındırma müşterilerimize Facebook + Google + Apple OAuth kurulumu ve gerekli policy sayfaları hazırlığı dahil destek veriyoruz.


Why Facebook OAuth Still Matters​

Although Google + Apple Sign-in are popular, Facebook Login is still widespread — including in Turkey. Letting forum members sign up via social auth reduces friction and brings richer profiles (name, profile picture) ready-made. XenForo supports the integration natively — you only need to create an app in Meta Developer Console.

Step 1 — Meta Developer Account​

Go to https://developers.facebook.com/ and log in with your Facebook account. First-time visitors complete the "Get Started" flow. Then My Apps → Create App.

Step 2 — App Type​

The wizard asks about your use case. Pick:
- Authenticate and request data from users with Facebook Login

On the next screen, app details:
- Display name: "AIOR Community" (user-visible)
- Contact email: hi@aior.com
- Business account: optional (you can leave it blank)

Click "Create app". The system generates a 16-digit App ID and App Secret.

Step 3 — Add Facebook Login Product​

On the app dashboard go to Add a Product. On the Facebook Login card click "Set Up". On the next screen pick platform: Web.

Site URL: https://aior.com

Step 4 — OAuth Settings​

In the left menu, go to Facebook Login → Settings.

Valid OAuth Redirect URIs:
Code:
https://aior.com/community/register/connected/facebook
https://aior.com/community/login/connected/facebook

Match your actual XenForo install path.

Client OAuth Login: Enabled
Web OAuth Login: Enabled
Enforce HTTPS: Yes (required for production)

Click "Save Changes".

Step 5 — Copy App ID and Secret​

In the left menu, Settings → Basic. App ID and App Secret are shown. Click "Show" next to App Secret — Facebook may ask for your password again. Save both values securely.

Step 6 — App Review (Required for Production)​

New apps default to "Development" mode — only users added to the app's roles can sign in. For production:

1. Go to App Review → Permissions and Features
2. Confirm public_profile and email are "Approved" (auto-granted for new apps)
3. Fill "Privacy Policy URL" under Settings → Basic (https://aior.com/privacy-policy)
4. Upload an app icon (1024x1024 PNG)
5. From App Review → Status, click "Make app public"

Step 7 — Configure XenForo Admin​

XenForo Admin → Setup → Connected accounts. Enable the Facebook provider.

- App ID: xxxxxxxxxxxxx
- App Secret: yyyyyyyyyyyyy

Save.

Step 8 — Test​

Open https://aior.com/community/login in Incognito. Click "Sign in with Facebook". Facebook's login screen and a permission dialog (email, profile) appear. After Allow, you're redirected to XenForo, where a new account is created or an existing one is matched.

Common Errors​

"URL Blocked: This redirect failed": the Valid OAuth Redirect URI doesn't match exactly. Check http vs https, trailing slash, www prefix.

"App not active": the app is still in Development mode. Make it public or add test users.

"Invalid Scopes: email": the email permission isn't approved. Check App Review → Permissions.

"#_=_" URL residue: after Facebook redirect, the URL keeps #_=_. XenForo cleans it automatically but in older versions you may need a manual fix: if (window.location.hash === "#_=_") history.replaceState(null, null, window.location.href.split("#")[0]);

Privacy Policy Requirement​

For Meta production approval, a detailed Privacy Policy URL is mandatory. The AIOR site uses https://aior.com/privacy-policy to document how user data is processed, retention periods and third-party sharing. This is required for KVKK and GDPR compliance.

At AIOR we set up Facebook + Google + Apple OAuth and the required policy pages as part of our forum hosting service.
 
Last edited:

Forum statistics

Threads
891
Messages
898
Members
27
Latest member
AIORAli

Members online

No members online now.

Featured content

AIOR
AIOR TEKNOLOJİ

Tüm ihtiyaçlarınız için Teklif alın

Hosting · Domain · Sunucu · Tasarım · Yazılım · Mühendislik · Sektörel Çözümler

Teklif al

7/24 Destek · Anında yanıt

Back
Top