1

I am new to Drupal 7. I am using Drupal for Facebook and it can generate Access Tokens by using AppID and Secret. But is there way to use Facebook module's functions in the body of Article or Basic page? I want to add a custom script, which requires FB Access Token, but I do not know how to get it without recreating it from the scratch.

Thank you in advance.

  • What do you mean by "in the body of an element"? What kind of element? – Aaron Sep 4 '15 at 19:25
  • Article, for example. Or basic page. Adding some JS between <script></script> – Shultc Sep 4 '15 at 20:10
  • Ok, so you're not talking about the body field of an entity in Drupal, but rather just asking about how to add arbitrary JS to a page in Drupal. There are several ways; I'd recommend starting here: drupal.org/node/304255. You'll want to write a custom module that makes the necessary calls to functions the Facebook module provides, then adds the appropriate JS to the page. – Aaron Sep 4 '15 at 20:17
  • Yes, I know how to add arbitrary JS to the page. But I do not know, how to make necessary calls to functions the Facebook module provides... – Shultc Sep 4 '15 at 20:25
  • I would suggest you rephrase your question to focus more on the usage of the Facebook module's functions than on how to "use that token in the body of an element". – Aaron Sep 4 '15 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.