1
페이스 북의 맛있는 앱 샘플 코드에서이 코드를 사용하려고합니다. 나는 당신의 OG 객체가 당신의 서버에 의해 호스트 된 URL을 가질 것이라는 것에 대해 혼란 스럽다. " 논평. 이것은 서버에 스크립트를로드해야한다는 것을 의미합니까? 그렇다면 어떤 스크립트입니까? 또한, "repeater.php"파일. 이게 뭐야?페이스 북으로 작업하기 맛있는 앱 샘플 코드
다른 사람이 구성해야하며 올바른 방향으로 나를 가리킬 수 있습니까? 어떤 도움을 주셔서 감사합니다.
- (id<SCOGMeal>)mealObjectForMeal:(NSString*)meal
{
// This URL is specific to this sample, and can be used to
// create arbitrary OG objects for this app; your OG objects
// will have URLs hosted by your server.
NSString *format =
@"https://<YOUR_BACK_END>/repeater.php?"
@"fb:app_id=<YOUR_APP_ID>&og:type=%@&"
@"og:title=%@&og:description=%%22%@%%22&"
@"og:image=https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png&"
@"body=%@";
// We create an FBGraphObject object, but we can treat it as
// an SCOGMeal with typed properties, etc. See <FacebookSDK/FBGraphObject.h>
// for more details.
id<SCOGMeal> result = (id<SCOGMeal>)[FBGraphObject graphObject];
// Give it a URL that will echo back the name of the meal as its title,
// description, and body.
result.url = [NSString stringWithFormat:format,
@"<YOUR_APP_NAMESPACE>:meal", meal, meal, meal];
return result;
}